Jump to content
  • Advertisement
Sign in to follow this  
captacha

OpenGL Starting OpenGL with SDL

This topic is 2468 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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();

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!