PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Source Code for dynamically binding OpenGL|ES

hi all,

since it was requested i'm posting my source code for dynamically binding all OpenGL|ES functions exposed by libGLES_CM.dll and/or libGLES_CL.dll. the binding function can also create a report about missing exposed functions.

it was tested and works fine with hybrid's software implementation and the X50v's 2700G.

the code might not work out of the boxed since it was integrated into a larger project but it should be fairly easy to fix the include statements.
btw: i prefixed all functions with an underscore but it should be no problem to remove that if required.
get the OpenGL|ES header files from the khronos.org

bye,
Daniel
Attachments:
OGLES_Bind.zip (11 KB)
Thanks, I will have a look at it today.
Thanks. I am currently still using the lib but i will give this a shot :)

Tala
Hi,

can someone explain how this code would be used in a larger project and why,

Thanks!
i don't understand your question.
this is source code and it is free for use, which is always good for any kind of project. :)

maybe you can explain your question a little bit more...

bye,
Daniel
Im probably missing something blinding obvious here, so forgive me…

But what is this source code used for? As it stands in my engine I just include the opengles headers and code away :)


So my question is really to understand if I should be using a derivative of this code in my engine?
It is for dynamically accessing the DLL. Thus if the DLL does not exist your application will still run, and you can fall back on software rendering or provide a concise error message to the user, like "This program only runs on devices with 3D hardware", instead of the vague Windows error message "A required component is missing".

Dan East
*Penny drops*


Thanks Dan, I get it now, ive not had much experience at actually deploying applications so these issues are yet to arise, but yes that’s a good thing to integrate, it can go on my todo list :P
another advantage is that it can bind common or common lite OpenGL ES. so if you have an OpenGL ES implementation that only exposes the common lite subset, it will still work without popping up messages of missing DLLs.

bye,
Daniel