Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

OpenGL questions

4: Adsense

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
7 replies to this topic

#1 Lewis_1986   Members   

102
Like
0Likes
Like

Posted 27 August 2011 - 11:57 AM

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?

#2 karwosts   Members   

840
Like
0Likes
Like

Posted 27 August 2011 - 06:54 PM

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.
My Projects:
Portfolio Map for Android - Free Visual Portfolio Tracker
Electron Flux for Android - Free Puzzle/Logic Game

#3 Lewis_1986   Members   

102
Like
0Likes
Like

Posted 29 August 2011 - 01:16 AM

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:

#4 Brother Bob   Moderators   

10275
Like
0Likes
Like

Posted 29 August 2011 - 05:56 AM

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.

#5 TheBuzzSaw   Members   

143
Like
0Likes
Like

Posted 29 August 2011 - 09:33 AM

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.

#6 Lewis_1986   Members   

102
Like
0Likes
Like

Posted 30 August 2011 - 02:51 PM

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

#7 Ectara   Members   

3097
Like
0Likes
Like

Posted 30 August 2011 - 05:55 PM

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.

#8 Lewis_1986   Members   

102
Like
1Likes
Like

Posted 31 August 2011 - 12:52 AM

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!




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.