Hi Alok,

On Fri, May 14, 2010 at 8:50 PM, Robert Osfield
<[email protected]> wrote:
> One thing I feel that we could improve the code further would be to
> use a macro for each of that static function mappings.  It's well in
> the evening here so I'll not attempt to code change the code right
> now, next week I'll have a bash at illustrating what I mean.  As
> things stand if code works for you then great - we can polish it
> later.

I've now implemented what I was thinking about so the function setup
code now looks like:

#define ADD_FUNCTION(FunctionName) sProcAddressMap[#FunctionName] =
reinterpret_cast<GLProc>(&FunctionName);

void initGLES2ProcAddress()
{
    ADD_FUNCTION(glActiveTexture)
    ADD_FUNCTION(glAttachShader)
    ADD_FUNCTION(glBindAttribLocation)
    ADD_FUNCTION(glBindBuffer)
...

I've partially built this under my GL2 install, but not everything
compiles so I don't know for sure whether everything is working OK.
Could you please do an checkout out of svn/trunk and test to make sure
that my new code compiles and run as your own did originally.

Thanks,
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to