Bug 57802

Summary: including GL/gl.h and another gl header causes redefinition warnings
Product: Mesa Reporter: Matthew Waters <ystreet00>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: remove compiler warnings when including GL/gl.h with other gl headers

Description Matthew Waters 2012-12-02 11:47:46 UTC
GL/gl.h provides some definitions (GL_FALSE, GL_ONE, etc) that have the same value as other gl headers but are represented differently (0 vs 0x0 and 1 vs 0x1). This causes compiler warnings about redefining such definitions when including GL/gl.h with other gl headers.

The Khronos gl headers are consistent.
Comment 1 Matthew Waters 2012-12-02 11:49:00 UTC
Created attachment 70909 [details] [review]
remove compiler warnings when including GL/gl.h with other gl headers
Comment 2 Brian Paul 2012-12-03 15:33:01 UTC
Just curious: why are you including both OpenGL's gl.h and other Khronos (ES?) headers in the same file?

The changes look OK to me and I can commit them later.
Comment 3 Matthew Waters 2012-12-06 04:38:26 UTC
(In reply to comment #2)
> Just curious: why are you including both OpenGL's gl.h and other Khronos
> (ES?) headers in the same file?

I am experimenting with having both opengl and ES support in an application.
Comment 4 Brian Paul 2012-12-06 16:10:19 UTC
OK, committed.  ac24d172582cdb7a79098ca43ca8870712a98068

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.