
Color3 and CallList
Posted Friday, 9 September, 2011 - 20:47 by gooky inI 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.
Best regards,
A newbee...


Comments
Re: Color3 and CallList
Maybe list erases color definition with the one definied between gl.Begin() and gl.EndList()...
Iliak
www.mimicprod.net
www.dungeoneye.net : Open source remake of Eye of the Beholder II