[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58720] branches/soc-2013-viewport_fx: Can compile with WGL to initialize ES on desktop, but it turns out my gpu doesn' t support the WGL_EXT_create_context_es2_profile, so I can't test it :(
Jason Wilkins
Jason.A.Wilkins at gmail.com
Mon Jul 29 18:58:32 CEST 2013
Revision: 58720
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58720
Author: jwilkins
Date: 2013-07-29 16:58:32 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
Can compile with WGL to initialize ES on desktop, but it turns out my gpu doesn't support the WGL_EXT_create_context_es2_profile, so I can't test it :(
Modified Paths:
--------------
branches/soc-2013-viewport_fx/CMakeLists.txt
branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_Context.cpp
branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_ContextWGL.cpp
branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp
Modified: branches/soc-2013-viewport_fx/CMakeLists.txt
===================================================================
--- branches/soc-2013-viewport_fx/CMakeLists.txt 2013-07-29 16:09:57 UTC (rev 58719)
+++ branches/soc-2013-viewport_fx/CMakeLists.txt 2013-07-29 16:58:32 UTC (rev 58720)
@@ -2073,8 +2073,10 @@
set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_ES_ONLY")
endif()
- if (WITH_GL_PROFILE_ES20)
- set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_USE_LIB_ES20")
+ if(WITH_GL_PROFILE_ES20)
+ if(WITH_GL_SYSTEM_EMBEDDED)
+ set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_USE_LIB_ES20")
+ endif()
# XXX jwilkins: this is just an experiment to eliminate ES 1 symbols,
# GLEW doesn't really properly provide this level of control (it eliminates too many symbols, for example),
Modified: branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_Context.cpp
===================================================================
--- branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_Context.cpp 2013-07-29 16:09:57 UTC (rev 58719)
+++ branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_Context.cpp 2013-07-29 16:58:32 UTC (rev 58720)
@@ -48,25 +48,25 @@
return "OK";
case GLEW_ERROR_NO_GL_VERSION:
- return "Missing GL version";
+ return "Unable to determine GL version.";
case GLEW_ERROR_GL_VERSION_10_ONLY:
- return "Need at least OpenGL 1.1";
+ return "OpenGL 1.1 or later is required.";
case GLEW_ERROR_GLX_VERSION_11_ONLY:
- return "Need at least GLX 1.2";
+ return "GLX 1.2 or later is required.";
case GLEW_ERROR_NOT_GLES_VERSION:
- return "Need to be OpenGL ES version";
+ return "OpenGL ES is required.";
case GLEW_ERROR_GLES_VERSION:
- return "Need to be desktop OpenGL version";
+ return "A non-ES version of OpenGL is required.";
case GLEW_ERROR_NO_EGL_VERSION:
- return "Missing EGL version";
+ return "Unabled to determine EGL version.";
case GLEW_ERROR_EGL_VERSION_10_ONLY:
- return "Need at least EGL 1.1";
+ return "EGL 1.1 or later is required.";
default:
return NULL;
Modified: branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_ContextWGL.cpp
===================================================================
--- branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_ContextWGL.cpp 2013-07-29 16:09:57 UTC (rev 58719)
+++ branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_ContextWGL.cpp 2013-07-29 16:58:32 UTC (rev 58720)
@@ -575,8 +575,6 @@
// the following are not technially WGLEW, but they also require a context to work
- initGlew();
-
#ifndef NDEBUG
delete m_dummyRenderer;
delete m_dummyVendor;
@@ -923,7 +921,6 @@
int profileBitCore = m_contextProfileMask & WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
int profileBitCompat = m_contextProfileMask & WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
int profileBitES = m_contextProfileMask & WGL_CONTEXT_ES_PROFILE_BIT_EXT;
- int profileBitES2 = m_contextProfileMask & WGL_CONTEXT_ES2_PROFILE_BIT_EXT;
if (!WGLEW_ARB_create_context_profile && profileBitCore)
fprintf(stderr, "Warning! OpenGL core profile not available.\n");
@@ -931,10 +928,10 @@
if (!WGLEW_ARB_create_context_profile && profileBitCompat)
fprintf(stderr, "Warning! OpenGL compatibility profile not available.\n");
- if (!WGLEW_EXT_create_context_es_profile && profileBitES)
+ if (!WGLEW_EXT_create_context_es_profile && profileBitES && m_contextMajorVersion == 1)
fprintf(stderr, "Warning! OpenGL ES profile not available.\n");
- if (!WGLEW_EXT_create_context_es2_profile && profileBitES2)
+ if (!WGLEW_EXT_create_context_es2_profile && profileBitES && m_contextMajorVersion == 2)
fprintf(stderr, "Warning! OpenGL ES2 profile not available.\n");
int profileMask = 0;
@@ -948,9 +945,6 @@
if (WGLEW_EXT_create_context_es_profile && profileBitES)
profileMask |= profileBitES;
- if (WGLEW_EXT_create_context_es2_profile && profileBitES2)
- profileMask |= profileBitES2;
-
std::vector<int> iAttributes;
if (profileMask) {
Modified: branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-07-29 16:09:57 UTC (rev 58719)
+++ branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-07-29 16:58:32 UTC (rev 58720)
@@ -584,7 +584,7 @@
// XXX jwilkins: some implementations will only give you 3.2 even if later compatible versions are available
GHOST_Context* context = new GHOST_ContextWGL(m_hWnd, m_hDC, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, 3, 2);
#elif defined(WITH_GL_PROFILE_ES20)
- GHOST_Context* context = new GHOST_ContextWGL(m_hWnd, m_hDC, WGL_CONTEXT_ES2_PROFILE_BIT_ARB, 2, 0);
+ GHOST_Context* context = new GHOST_ContextWGL(m_hWnd, m_hDC, WGL_CONTEXT_ES2_PROFILE_BIT_EXT, 2, 0);
#elif defined(WITH_GL_PROFILE_COMPAT)
GHOST_Context* context = new GHOST_ContextWGL(m_hWnd, m_hDC);
#else
@@ -615,10 +615,11 @@
void GHOST_WindowWin32::lostMouseCapture()
{
- if (m_hasMouseCaptured)
- { m_hasGrabMouse = false;
- m_nPressedButtons = 0;
- m_hasMouseCaptured = false; };
+ if (m_hasMouseCaptured) {
+ m_hasGrabMouse = false;
+ m_nPressedButtons = 0;
+ m_hasMouseCaptured = false;
+ }
}
void GHOST_WindowWin32::registerMouseClickEvent(int press)
More information about the Bf-blender-cvs
mailing list