Jump to content

  • Log In with Google      Sign In   
  • Create Account


Starting OpenGL with SDL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Captacha   Members   -  Reputation: 141

Like
0Likes
Like

Posted 08 March 2012 - 08:05 AM

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.
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 640, 480, 0.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();


Sponsor:

#2 Tordin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 08 March 2012 - 08:37 AM

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!
"There will be major features. none to be thought of yet"

#3 Dunge   Members   -  Reputation: 405

Like
0Likes
Like

Posted 08 March 2012 - 09:14 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS