Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Question About Opengl Codes.
Feelay
post Aug 9 2008, 11:37 AM
Post #1


Kinda N00B
Group Icon

Group: Members
Posts: 230
Joined: 13-January 08
From: Sweden
Member No.: 27,579



Hey!

I've started to learn windows API programming. And I've been using OpenGL.
I am following a tutorial, But I didn't understand every comment. So I rewrote the code some times to learn it, and made my own comments. Some of the rows have the comment "What do this row do??". I would be happy, if you could explain those rows to me =), please.

And BTW: I am only on the first tutorial. When I start with the others, I am sure I will have more questions. And if someone else have a questions about OpenGl, feel free to ask them here, instead of starting a new topic wink.gif.

PS! The codes I will write here is not mine! (they come from tutorials from a site named swiftless), and I don't know if I should put them in quote tags or code tags. But If they should be in qoute tags, I am sorry.

CODE
#include <GL/gl.h>//include the gl header file
#include <GL/glut.h>//Include the glut header file

void display (void){
     glClearColor(0.0,0.5,0.9,0.8);//BG Color
     glClear (GL_COLOR_BUFFER_BIT);//What do this row do??
     glLoadIdentity();//What do this row do??
     gluLookAt(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);//Camera Position
     glFlush();//What do this row do??
     }
    
int main (int argc, char **argv){
    glutInit (&argc, argv);//What do this row do??
    glutInitDisplayMode (GLUT_SINGLE);//What do this row do??
    glutInitWindowSize(900,900);//Window Size
    glutInitWindowPosition(0,0);//Window Position
    glutCreateWindow ("Feelay's Fifth;)");//Window Title
    glutDisplayFunc (display); //What do this row do??
    glutMainLoop();//What do this row do??
    return 0; //xD What do this row do :P??
}
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics


 



- Lo-Fi Version Time is now: 5th December 2008 - 10:49 AM