Jump to content
  • Advertisement
Sign in to follow this  
Panicbox

OpenGL Drawing to a Position

This topic is 2540 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

Hi.

I've just begun learning about OpenGL ES 2.0. I've used OpenGL a little with the standard pipeline before, but I'm struggling with a few things.

Before when I've wanted to draw an object at a specific position (say player model at player position) I'd push the matrix, glTranslatef and then pop it afterwards.

However ES 2.0 deprecated Push and PopMatrix.

So what would be the generally accepted best way of doing this now?

Thanks in advance, all help appreciated.

Share this post


Link to post
Share on other sites
Advertisement
ES 2.0 deprecates not only Push and PopMatrix, but the fixed pipeline as a whole. Thus, you should write shaders and perform all the transformations by yourself. So there are no actual commands that "replace" matrix stack operations: you just pass any needed matrices to shaders and use them there accordingly. Therefore, if you still for some reason need a stack, you'd have to implement it yourself.

Generally, you'd be better off reading the GLES spec (and a GLSL ES spec) for better view of the action. And you can find plenty of examples for programmable pipeline out there on the net (like this one).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!