Advertisement

SDL & OpenGL

Started by August 06, 2004 11:53 AM
11 comments, last by BakaHitokiri 20 years, 3 months ago
noone?
- BkH ^^
Maybe the problem that u see nothing is that by default the front of a polygone is defined by setting the vertices counter clockwise
so your polys face away from the screen and are culled away...
either use glFrontFace(GL_CW) or change the order of vertices
e.g. to
// draw a triangle
glBegin(GL_POLYGON); // start drawing a polygon
glVertex3f( 0.0f, 1.0f, 0.0f); // Top
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glEnd(); // we're done with the polygon

Advertisement
ill try that, thank you :)
- BkH ^^

This topic is closed to new replies.

Advertisement