summaryrefslogtreecommitdiffstats
path: root/platform/windows/context_gl_win.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-02 19:12:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-02 19:12:25 -0300
commitce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (patch)
tree5f9c387037d0142d40f7275575436483dc0a7237 /platform/windows/context_gl_win.cpp
parentab4126f51061277e87b41c48b40e7b54942d4eca (diff)
parent45c5c89de961357a7042d9e1f063e288d7a510cf (diff)
downloadredot-engine-ce26eb74bca48f16e9a34b4eb1c34e50dfc5daae.tar.gz
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'platform/windows/context_gl_win.cpp')
-rw-r--r--platform/windows/context_gl_win.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp
index fd9e895370..136ac310f6 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_win.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -110,6 +110,7 @@ bool ContextGL_Win::is_using_vsync() const {
return use_vsync;
}
+#define _WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
Error ContextGL_Win::initialize() {
@@ -162,10 +163,10 @@ Error ContextGL_Win::initialize() {
if (opengl_3_context) {
int attribs[] = {
- WGL_CONTEXT_MAJOR_VERSION_ARB, 3,//we want a 3.1 context
- WGL_CONTEXT_MINOR_VERSION_ARB, 2,
+ WGL_CONTEXT_MAJOR_VERSION_ARB, 3,//we want a 3.3 context
+ WGL_CONTEXT_MINOR_VERSION_ARB, 3,
//and it shall be forward compatible so that we can only use up to date functionality
- WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
+ WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB|_WGL_CONTEXT_DEBUG_BIT_ARB,
0}; //zero indicates the end of the array
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL; //pointer to the method
@@ -182,7 +183,7 @@ Error ContextGL_Win::initialize() {
if (!(new_hRC=wglCreateContextAttribsARB(hDC,0, attribs)))
{
wglDeleteContext(hRC);
- MessageBox(NULL,"Can't Create An OpenGL 3.1 Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
+ MessageBox(NULL,"Can't Create An OpenGL 3.3 Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return false
}
wglMakeCurrent(hDC,NULL);
@@ -191,11 +192,11 @@ Error ContextGL_Win::initialize() {
if (!wglMakeCurrent(hDC,hRC)) // Try To Activate The Rendering Context
{
- MessageBox(NULL,"Can't Activate The GL 3.1 Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
+ MessageBox(NULL,"Can't Activate The GL 3.3 Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return FALSE
}
- printf("Activated GL 3.1 context");
+ printf("Activated GL 3.3 context");
}
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress ("wglSwapIntervalEXT");