Commit Graph

11 Commits (d4634526fdf1121f0d5c37eaa31e965936808cb2)

Author SHA1 Message Date
Günther Brammer d4634526fd GL: Switch from GLEW to Epoxy
Epoxy automatically fetches the extension functions on demand, including
the GLX context creation functions. This means that you can't test the
function pointers for NULL anymore, because they're always set to a
resolver function until the first call. Instead, you have to check for the
availability of an extension by the extension's name. Thanks to Isilkor for
catching these.

On windows, epoxy invalidates all extension function pointers when the
GL context changes. This means we need to have an active context at all
times we call an extension function (like wglGetPixelFormatAttribivARB)
or else the code will jump to an invalid pointer. On the other hand, we do
not need to make it reinitialize the pointers ourselves.

Epoxy automatically uses an alias for a function if the requested name is
not available, like glDebugMessageCallbackARB instead of
glDebugMessageCallback. It also does not have the problem with varying
parameter types for that function. So switch to it while removing
GLDEBUGPROCARB_USERPARAM_IS_CONST.
2016-02-06 16:50:47 +01:00
Martin Plicht b15f6bfb38 mac: Sprinkle some #include <GL/glew.h> onto 2 .mm files to make compiler happy
Also a break in a switch because clang told me so!
2015-09-04 18:28:57 +02:00
Nicolas Hake 1a1cecadd4 Update license texts
Some files, most notably ObjC and test cases, hadn't been updated to use
the new license header. Fix this.
2015-02-08 15:05:11 +01:00
Martin Plicht 2ca9a77cc4 mac: Do #include guessing dance until compile success 2015-02-04 21:52:04 +01:00
Nicolas Hake d994b893ba OSX: Fix capitalization of several imports and includes 2015-01-23 18:24:31 +01:00
Martin Plicht b9c68f2208 mac: Fix build (C4Viewport ViewX/Y accessors) 2015-01-05 01:38:35 +01:00
Martin Plicht fb4117307b mac: Fix Screen::rcBounds <> window size discrepancy + fullscreen windows still fill screen with less than fullscreen resolution in settings 2013-09-02 23:10:32 +02:00
Martin Plicht 41926866cc mac: Remove mouse-warping silliness (it doesn't work with tablets and I'm stupid D:) 2013-07-05 23:14:16 +02:00
Martin Plicht 38256bfaac mac: First startup with no resolution configuration uses desktop resolution, resolution switching from options works correctly 2012-10-13 15:01:13 +02:00
Martin Plicht 562565f865 mac: Move C4OpenGLView.mm/h to graphics/C4DrawGLMac.mm/h and move some C4AbstractApp functions to C4AppMac.mm to better match implementations for the other platforms 2012-09-02 20:51:43 +02:00
Martin Plicht 10a328d5ba mac: Change prefix of Objective-C classes/filenames from Clonk to C4, give xib files names that make more sense 2012-09-02 15:39:29 +02:00