FoodEater
YaBB Newbies
Offline
Posts: 7
Re: Processing OpenGL resources?
Reply #4 - Dec 11th , 2009, 2:19pm
koogy wrote on Dec 9th , 2009, 1:56am:simplicity
Code: glBegin(GL_QUADS); // Start Drawing Quads // Bottom Face glVertex3f(-1.0f, -1.0f, -1.0f); // Top Right Of The Texture and Quad glVertex3f( 1.0f, -1.0f, -1.0f); // Top Left Of The Texture and Quad glVertex3f( 1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad // Front Face glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad glVertex3f( 1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad // Back Face glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad glVertex3f(-1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad glVertex3f( 1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad glVertex3f( 1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad // Right face glVertex3f( 1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad glVertex3f( 1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad glVertex3f( 1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad glVertex3f( 1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad // Left Face glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad glVertex3f(-1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad glEnd();
vs
Code: box(1.0);
8)
It looks like you included texture unwrapping and stuff in the top one though. I suspect intentional lengthening to illustrate a point, and highly doubt there are no primitives in OpenGL.