summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-02-20 23:37:57 -0500
committerSam Lantinga <slouken@libsdl.org>2012-02-20 23:37:57 -0500
commit9da2e284ddb311b3a41740c113f089b4eb694113 (patch)
treeebc68ad3b4c520a3539465a4467363ef3dc27aac /include
parentefd78e8f9e083155ca8405ec6b75299568feb126 (diff)
Add OpenGL 3.X context creation support
Matthias Bentrup 2011-10-30 03:58:24 PDT I've updated the context creation patch to include the bugfixes by Martin Schreiber and also included a profile bit to request a ES2 compatible profile. The wgl context creation may use 2 call to wglChoosePixelFormat if no acceleration attribute is selected, this should work around a bug with buggy AMD drivers (see #1254).
Diffstat (limited to 'include')
-rw-r--r--include/SDL_video.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/SDL_video.h b/include/SDL_video.h
index 6b818b60..878c053f 100644
--- a/include/SDL_video.h
+++ b/include/SDL_video.h
@@ -182,9 +182,25 @@ typedef enum
SDL_GL_ACCELERATED_VISUAL,
SDL_GL_RETAINED_BACKING,
SDL_GL_CONTEXT_MAJOR_VERSION,
- SDL_GL_CONTEXT_MINOR_VERSION
+ SDL_GL_CONTEXT_MINOR_VERSION,
+ SDL_GL_CONTEXT_FLAGS,
+ SDL_GL_CONTEXT_PROFILE_MASK
} SDL_GLattr;
+typedef enum
+{
+ SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
+ SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
+ SDL_GL_CONTEXT_PROFILE_ES2 = 0x0004
+} SDL_GLprofile;
+
+typedef enum
+{
+ SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001,
+ SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
+ SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004
+} SDL_GLcontextFlag;
+
/* Function prototypes */