Make libdisable-npots a bit more portable
authorNeil Roberts <neil@linux.intel.com>
Mon, 5 Jan 2009 17:05:30 +0000 (17:05 +0000)
committerNeil Roberts <neil@linux.intel.com>
Mon, 5 Jan 2009 17:11:44 +0000 (17:11 +0000)
commite5543a658f74bcc6efb477d34953e5f2bf08d930
tree0713335ab9cfa64c5a8130c66d7a083ec3f8908a
parentff73fe3e1f142517617cddf6c73c72783bb7fe92
Make libdisable-npots a bit more portable

Instead of including GL/gl.h directly it now includes cogl/cogl.h
instead which should include the right GL header.

Instead of using dlopen to specifically open libGL it now tries to use
dlsym with RTLD_NEXT. This requires defining _GNU_SOURCE on GNU
systems. If RTLD_NEXT is not available it will try passing NULL which
is unlikely to work but it will at least catch the case where it
returns the wrapper version of glGetString to prevent infinite
recursion.

This should hopefully make it work on OS X where the name of the
header and library are different (although this is currently
untested).
tests/tools/Makefile.am
tests/tools/disable-npots.c