public override void Load(ProgramWindow parent) { this.parent = parent; GL.Disable(EnableCap.Dither); GL.Enable(EnableCap.Texture2D); GL.ClearColor(System.Drawing.Color.White); var vs = parent.CreateShader(ShaderType.VertexShader, VERTEXSHADER); var fs = parent.CreateShader(ShaderType.FragmentShader, FRAGMENTSHADER); program = parent.CreateProgram(vs, fs); GL.DeleteShader(vs); GL.DeleteShader(fs); this.bitmap = this.bitmap ?? new System.Drawing.Bitmap(parent.Width, parent.Height); texture = parent.LoadTexture(this.bitmap, unit); }
public override void Load(ProgramWindow parent) { this.parent = parent; GL.Disable(EnableCap.Dither); GL.Enable(EnableCap.Texture2D); GL.ClearColor(System.Drawing.Color.Black); var vs = parent.CreateShader(ShaderType.VertexShader, VERTEXSHADER); var fs = parent.CreateShader(ShaderType.FragmentShader, FRAGMENTSHADER); program = parent.CreateProgram(vs, fs); GL.DeleteShader(vs); GL.DeleteShader(fs); }