glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 640, 480, 0.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
Starting OpenGL with SDL
I'm trying to start learning graphics programming in OpenGL in SDL. I found this example program which shows how to paste a texture onto a square, but it doesn't explain anything. I looked it up on the documentation and it talks about changing some Matrices. Can anyone explain this to me? It seems pretty critical! Here's some code I found confusing.
What they reffer to, is what you call a View & Projection Matrix. this contains vital information when transforming models and stuff into 3d.
But besides that, have you started from the begining?
else here is some pretty sharp tutorials :
http://nehe.gamedev.net/tutorial/lessons_01__05/22004/
Never read them myself, but i have only heard that they are the best online!
But besides that, have you started from the begining?
else here is some pretty sharp tutorials :
http://nehe.gamedev.net/tutorial/lessons_01__05/22004/
Never read them myself, but i have only heard that they are the best online!
Never read them myself, but i have only heard that they are the best online!
They were, in the pre-2000 era. Nowadays they are pretty much outdated and I've read many critics saying it was not teaching good coding concepts. But you are right though, Captacha should learn basic 3D concepts before trying to analyze code. Using transformation matrices is the basic of 3d programming, don't start coding until you understand that.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement