I am reading different tutorials in my quest to learn OpenGL.
I declare a list in the OnLoad:
id = GL.GenLists(1); GL.NewList(id, ListMode.Compile); // create GL.Begin(BeginMode.Triangles); //GL.Color3(1, 0, 0); GL.Vertex3(-1.0f, -1.0f, 4.0f); GL.Vertex3(1.0f, -1.0f, 4.0f); GL.Vertex3(0.0f, 1.0f, 4.0f); GL.End(); GL.EndList();
Next I would like to draw the list in red to the screen in OnRenderFrame:
GL.Color3(1, 0, 0); GL.CallList(id);
Nothing appears on the screen. If I uncomment "GL.Color3(1, 0, 0);" inside the creation of the list, the color shows, how come is that? It is like the "GL.Color3(1, 0, 0);" in the onrenderframe is not executed.