Bug 57802 - including GL/gl.h and another gl header causes redefinition warnings
Summary: including GL/gl.h and another gl header causes redefinition warnings
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 11:47 UTC by Matthew Waters
Modified: 2012-12-06 16:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
remove compiler warnings when including GL/gl.h with other gl headers (1.90 KB, patch)
2012-12-02 11:49 UTC, Matthew Waters
Details | Splinter Review

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.