gooky's picture

Color3 and CallList

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.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);

Next I would like to draw the list in red to the screen in OnRenderFrame:

GL.Color3(1, 0, 0);

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...


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
iliak's picture

Maybe list erases color definition with the one definied between gl.Begin() and gl.EndList()...

Iliak : Open source remake of Eye of the Beholder II