Bug#727175: New patch, compatible with older versions

Brandon winterknight at email.com
Sun Oct 27 21:24:05 UTC 2013


I have a new patch that is compatible with older and newer versions of
OpenGL, compatibility and core profile. Some notes:

The code has two branches, one for < GL 3.0, and one for GL 3.0+. We
determine which branch to choose at runtime, because we don't know what
GL version the end user will be linking against. We can't call
glGetStringi directly because it is only available in GL 3.0+, so we use
glXGetProcAddressARB to acquire the address of glGetStringi and to see
if it is available. It will be available if the user links against a GL
library that is 3.0+, but will not work if the context is < 3.0,
therefore we also check the running GL version. I made sure the program
doesn't crash if any GL functions return a NULL pointer, even when
they shouldn't according to current specs. This patch no longer needs
the GL_GLEXT_PROTOTYPES definition.

-Brandon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_glGetString_crash2.patch
Type: text/x-patch
Size: 5066 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20131027/d36a17d2/attachment-0001.bin>


More information about the Pkg-games-devel mailing list