OpenGL questions

Started by
6 comments, last by Lewis_1986 12 years, 8 months ago
Hi,

Currently I have been using glLoadMatrix and glGetFloatv to load and save the matricies, is there a better way to do this that is also compatible with OpenGL ES for the nvidia Tegra 2 hardware platform?
Advertisement
Those are both deprecated methods, and I believe that OpenGL ES (2.0 anyway) doesn't support these. You will have to abandon OpenGL's matrix stack, and use your own shaders and uniform matrices.

They may still be supported in 1.x (I'm not sure), but your best bet would be to learn the new methods.
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
Hi, I was asking what the best method of doing this would be, In the context of OpenGL ES2.0 obviously. I realise that you probably won't paste the exact code to do this, but a pointer to a url would be great

Thanks :wink:
Your only option to get the matrices into your shaders is via the glUniform family of functions. Reading them back should not be an issue, since you already have the matrix.
Learn the matrix math.
Build a matrix object.
Optimize it.
?????
Profit!!!
Amateurs practice until they do it right.Professionals practice until they never do it wrong.
gotcha, so basically I have to make an opengl compatible matrix class? or can I use one somewhere else that someone else can maintain because outside of 3d programming I have little need for matricies in my life

gotcha, so basically I have to make an opengl compatible matrix class? or can I use one somewhere else that someone else can maintain because outside of 3d programming I have little need for matricies in my life


If you write the matrix code now, it'll benefit you immensely, should you need it again later for something such as physics or animation. Linear math is useful all throughout a project.
just as a note Ectara is 1000% right and for those finding it hard to get into openGL without fixed function read http://developer.android.com/guide/topics/graphics/opengl.html, it is talking about android but their openGL es2.0 example was exactly what I was looking for when I created this post!

This topic is closed to new replies.

Advertisement