Sign in to follow this  
dmnxia

Missing functions in OpenGL ES

Recommended Posts

Well, obviously ES isn't gonna have all the functionality of OpenGL but in particular I noticed in the specs that glPushAttrib() was taken out for performance reasons. I guess this means we need to take care of state managment without it, but Im not really sure the best way to do this. transformations or the color you're using to draw aren't really an issue to me but what about more complex things? I guess we need to figure out how to query GL about anything we are gonna change with one of the glGet fcns and then save the current state somehow? Any help figuring this out would be much appreciated. thnx, D

Share this post


Link to post
Share on other sites
State management and reduction of redundant state setting is one of the best ways to squeeze some additional rendering performance out of applications, so you're on the right track.

Here's what I recommend:

-- Set states that are interesting to you to known values initally

-- Keep track of what you set

-- Reject redundant state sets within your own application

Then you don't need to ask the API what an attrib is set to, because *your* program knows what it last set.

Share this post


Link to post
Share on other sites
Hmm...I guess I wanted some ideas on how best to go about keeping track. I was thinking of maybe just keeping some bitflags. In the past I've only worked with openGL at school so dont have a lot of experience optimizing for resource limited platforms. I'll try to keep what you said in mind though.

Share this post


Link to post
Share on other sites
Using a struct to keep track of the states you care about is probably your best bet. Note that OpenGL ES 1.0 doesn't allow you to query dynamic state with glGet, so you pretty much HAVE to keep track of them in your application.

Share this post


Link to post
Share on other sites
hi. well, i was using the blackcap16 device and i saw something strange. the brew implementation of opengl ES contains texture objects, but if i try to use them with this device the program crashes. why? it crashes when i call glDeleteTextures, at the end of the program

Share this post


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