Bug 517959 - GL 1.3 function pointer typedef's are missing
Summary: GL 1.3 function pointer typedef's are missing
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-18 07:25 UTC by Hans de Goede
Modified: 2009-08-18 19:29 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-18 19:29:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2009-08-18 07:25:54 UTC
Not sure if this is a bug, but I still thought I should report it. I've seen 2 programs now which fail to compile on rawhide, because the function pointer typedef's for GL 1.3 functions are not defined by the rawhide OpenGL headers.

These function pointer typedefs, like for example PFNGLACTIVETEXTUREPROC, are
defined in GL/glext.h. But only if GL_VERSION_1_3 is not defined yet when glext.h
gets included. These days glext.h gets included automatically by GL.h, which
defines GL_VERSION_1_3, but does not define the function pointer typedefs.

For now I've worked around this in both programs using this (ugly) construction,
better suggestions are welcome:

#define __glext_h_  // Don't let gl.h include glext.h
#include <GL/gl.h>
#include <GL/glu.h>
#undef __glext_h_M
/* We want / need the OpenGL 1.3 function pointer typedefs */
#undef GL_VERSION_1_3
#include <GL/glext.h>

Note that under F-11, all that is needed is:
#include <GL/gl.h>
#include <GL/glu.h>

Comment 1 Adam Jackson 2009-08-18 19:29:06 UTC
This is intentional, afaict.  The reasoning appears to be the same as the #ifdef _XOPEN_SOURCE and such that happens in glibc's headers: avoid polluting the namespace of programs unless they were explicitly written to expect the newer APIs.  I think it's silly for pre-3.0 API, but it's the OpenGL ARB's decision, not mine.


Note You need to log in before you can comment on or make changes to this bug.