FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

OpenGL glIsEnabled Calls

2 posters

Go down

OpenGL glIsEnabled Calls Empty OpenGL glIsEnabled Calls

Post  uprise78 Wed Mar 25, 2009 5:21 pm

Im still a super newbie in openGL so please correct me if i am wrong on this. From the couple books i am in the process of reading they all make mention that you should try to reduce or eliminate any calls to glIsEnabled and keep the state yourself in your own code. I see a lot of calls like the following in sio2:

Code:
      if( !glIsEnabled( GL_BLEND ) )
      { glEnable( GL_BLEND ); }

Would there be a significant advantage to keeping state in the sio2 struct instead of querying openGL?

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

OpenGL glIsEnabled Calls Empty Re: OpenGL glIsEnabled Calls

Post  sio2interactive Wed Mar 25, 2009 6:01 pm

yes that can be done... however glIsEnabled will check the client state on a GL_CONTEXT basis held in the client memory (and from what I understand in software) so basically Im not sure that the speed gain will be significant... but still worth the try...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum