[Mesa-dev] How to implement the OpenGL functions

Ritvik_Sharma at Dell.com Ritvik_Sharma at Dell.com
Thu Feb 7 00:57:36 PST 2013


If I want to implement some OpesnGL function , say glLoadIdentity.
When I see the function declaration in Mesa or OpenGL its usually defined as :

WINGDIAPI void APIENTRY glLoadIdentity (void);

extern PFNGLLOADIDENTITYPROC __gleLoadIdentity;
#define glLoadIdentity __gleLoadIdentity

And on seeing how is this populated in the code I found

__gleLoadIdentity = (PFNGLLOADIDENTITYPROC)gleIntGetProcAddress("glLoadIdentity");

Can you guys help me in understanding  the function definition of the basic openGL functions without having to use GetProcAddress ? Or can you suggest an alternative to how can these OpenGL defined?

Thanks and Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130207/32d0cb2e/attachment.html>

More information about the mesa-dev mailing list