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
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??
}
#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??
}

