-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix calling conventions for GL functions.
The calling convention for all GL functions should be defined as GLAPIENTRY. On some platforms (esp. Linux), this is empty, resulting in whatever the default calling convention is for the compiler. On Windows, however, the calling convention should be __stdcall, which is _not_ the default of MSVC. Calling functions through pointers declared with the wrong convention results in stack corruption and ultimate doom, fire and brimstone. This change defines GLAPIENTRY in gl_types.h as __stdcall on WGL, and empty if it's not already defined. Throughout, I've used this define on anything that may be called through to GL or by GL (including things like the debug callback).
- Loading branch information
Graham Sellers
committed
May 22, 2014
1 parent
c2f49d8
commit 56d9348
Showing
7 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters