public Form1() { Geometries = new List <Geometry>(); InitializeComponent(); colorPanel.BackColor = colorDialog1.Color; countLabels.Text = Geometries.Count().ToString(); gridSizeTextBox.Text = GridSize.ToString(); GeometriesListBox.DrawMode = DrawMode.OwnerDrawFixed; // Get the OpenGL object, for quick access. OpenGL gl = openGLControl1.OpenGL; // A bit of extra initialisation here, we have to enable textures. gl.Enable(OpenGL.GL_TEXTURE_2D); // Create our texture object from a file. This creates the texture for OpenGL. tex = new Texture(); //tex.Create(gl, "D:\\a.bmp"); }