[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58487] branches/soc-2013-viewport_fx: Fixed up problems caused from previous update that appear when compiling WITH_GL_PROFILE_COMPAT and WITH_GL_SYSTEM_LEGACY (as opposed to WITH_GL_PROFILE_ES20 and WITH_GL_SYSTEM_EMBEDDED)
Jason Wilkins
Jason.A.Wilkins at gmail.com
Sun Jul 21 22:07:19 CEST 2013
Revision: 58487
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58487
Author: jwilkins
Date: 2013-07-21 20:07:18 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
Fixed up problems caused from previous update that appear when compiling WITH_GL_PROFILE_COMPAT and WITH_GL_SYSTEM_LEGACY (as opposed to WITH_GL_PROFILE_ES20 and WITH_GL_SYSTEM_EMBEDDED)
Modified Paths:
--------------
branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glesew.h
branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glew.h
branches/soc-2013-viewport_fx/extern/glew-es/src/glew.c
branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/soc-2013-viewport_fx/intern/locale/boost_locale_wrapper.cpp
branches/soc-2013-viewport_fx/source/blender/blenlib/intern/math_vector_inline.c
branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_image_proj.c
branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_deprecated.h
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_draw.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extensions.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_pixels.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_select.c
branches/soc-2013-viewport_fx/source/blender/python/generic/bgl.h
branches/soc-2013-viewport_fx/source/blender/render/intern/source/voxeldata.c
branches/soc-2013-viewport_fx/source/blender/windowmanager/intern/wm_keymap.c
Modified: branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glesew.h
===================================================================
--- branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glesew.h 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glesew.h 2013-07-21 20:07:18 UTC (rev 58487)
@@ -592,7 +592,7 @@
#endif
GLAPI void GLAPIENTRY glPixelStorei (GLenum pname, GLint param);
#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
-GLAPI void GLAPIENTRY gpuSpriteSize (GLfloat size);
+GLAPI void GLAPIENTRY glPointSize (GLfloat size);
#endif // XXX
GLAPI void GLAPIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
Modified: branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glew.h
===================================================================
--- branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glew.h 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glew.h 2013-07-21 20:07:18 UTC (rev 58487)
@@ -1159,7 +1159,7 @@
GLAPI void GLAPIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
GLAPI void GLAPIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
GLAPI void GLAPIENTRY glPixelStorei (GLenum pname, GLint param);
-GLAPI void GLAPIENTRY gpuSpriteSize (GLfloat size);
+GLAPI void GLAPIENTRY glPointSize (GLfloat size);
GLAPI void GLAPIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
GLAPI void GLAPIENTRY glPopMatrix (void);
GLAPI void GLAPIENTRY glPushMatrix (void);
@@ -1740,7 +1740,6 @@
#define glVertex4sv GLEW_GET_FUN(__glewVertex4sv)
#define GLEW_VERSION_1_1 GLEW_GET_VAR(__GLEW_VERSION_1_1)
-
#endif /* !GL_VERSION_1_1 */
/* ----------------------------- GL_VERSION_1_2 ---------------------------- */
Modified: branches/soc-2013-viewport_fx/extern/glew-es/src/glew.c
===================================================================
--- branches/soc-2013-viewport_fx/extern/glew-es/src/glew.c 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/extern/glew-es/src/glew.c 2013-07-21 20:07:18 UTC (rev 58487)
@@ -248,7 +248,25 @@
# define glewGetProcAddress(name) eglGetProcAddress(name)
#endif
#elif defined(_WIN32)
-# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
+ static HANDLE hOpenGL = NULL;
+
+ void* wGetProcAddress(LPCSTR name)
+ {
+ void* proc = wglGetProcAddress(name);
+
+ if(proc == NULL && hOpenGL == NULL) {
+ hOpenGL = LoadLibrary("opengl32.dll");
+ }
+
+ if(proc == NULL && hOpenGL != NULL) {
+ return GetProcAddress(hOpenGL, name);
+ }
+ else {
+ return proc;
+ }
+ }
+
+# define glewGetProcAddress(name) wGetProcAddress((LPCSTR)name)
#else
# if defined(__APPLE__)
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
@@ -4497,7 +4515,7 @@
r = ((glLightModeliv = (PFNGLLIGHTMODELIVPROC)glewGetProcAddress((const GLubyte*)"glLightModeliv")) == NULL) || r;
r = ((glLighti = (PFNGLLIGHTIPROC)glewGetProcAddress((const GLubyte*)"glLighti")) == NULL) || r;
r = ((glLightiv = (PFNGLLIGHTIVPROC)glewGetProcAddress((const GLubyte*)"glLightiv")) == NULL) || r;
- r = ((glLineStipple = (PFNGLLINESTIPPLEPROC)glewGetProcAddress((const GLubyte*)"gpuLineStipple")) == NULL) || r;
+ r = ((glLineStipple = (PFNGLLINESTIPPLEPROC)glewGetProcAddress((const GLubyte*)"glLineStipple")) == NULL) || r;
r = ((glListBase = (PFNGLLISTBASEPROC)glewGetProcAddress((const GLubyte*)"glListBase")) == NULL) || r;
r = ((glLoadMatrixd = (PFNGLLOADMATRIXDPROC)glewGetProcAddress((const GLubyte*)"glLoadMatrixd")) == NULL) || r;
r = ((glLoadName = (PFNGLLOADNAMEPROC)glewGetProcAddress((const GLubyte*)"glLoadName")) == NULL) || r;
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-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-07-21 20:07:18 UTC (rev 58487)
@@ -670,6 +670,7 @@
success = GHOST_kFailure;
}
#elif defined(WITH_GL_SYSTEM_EMBEDDED)
+ success = GHOST_kFailure;
GHOST_PRINT("GHOST_WindowWin32::activateDrawingContext for WITH_GL_SYSTEM_EMBEDDED not implemented\n");
#else
#error
@@ -752,6 +753,8 @@
#elif defined(WITH_GL_SYSTEM_EMBEDDED)
GHOST_PRINT("GHOST_WindowWin32::initMultisample for WITH_GL_SYSTEM_EMBEDDED not implemented\n");
return GHOST_kFailure;
+#else
+#error
#endif
}
Modified: branches/soc-2013-viewport_fx/intern/locale/boost_locale_wrapper.cpp
===================================================================
--- branches/soc-2013-viewport_fx/intern/locale/boost_locale_wrapper.cpp 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/intern/locale/boost_locale_wrapper.cpp 2013-07-21 20:07:18 UTC (rev 58487)
@@ -113,7 +113,7 @@
return r;
return msgid;
}
- catch(std::exception const &e) {
+ catch(std::exception const &) {
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
return msgid;
}
Modified: branches/soc-2013-viewport_fx/source/blender/blenlib/intern/math_vector_inline.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/blenlib/intern/math_vector_inline.c 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/blenlib/intern/math_vector_inline.c 2013-07-21 20:07:18 UTC (rev 58487)
@@ -609,7 +609,7 @@
MINLINE float len_manhattan_v2_int(const int v[2])
{
- return ABS(v[0]) + ABS(v[1]);
+ return (float)(ABS(v[0]) + ABS(v[1]));
}
MINLINE float len_manhattan_v3(const float v[3])
Modified: branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-07-21 20:07:18 UTC (rev 58487)
@@ -3525,7 +3525,7 @@
clone_rgba[0] = clone_pt[0];
clone_rgba[1] = clone_pt[1];
clone_rgba[2] = clone_pt[2];
- clone_rgba[3] = clone_pt[3] * mask;
+ clone_rgba[3] = (unsigned char)CLAMPIS(clone_pt[3] * mask, 0, 255);
if (ps->do_masking) {
IMB_blend_color_byte(projPixel->pixel.ch_pt, projPixel->origColor.ch, clone_rgba, ps->blend);
Modified: branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h 2013-07-21 20:07:18 UTC (rev 58487)
@@ -141,7 +141,7 @@
int GPU_texture_target(GPUTexture *tex);
int GPU_texture_opengl_width(GPUTexture *tex);
int GPU_texture_opengl_height(GPUTexture *tex);
-int GPU_texture_opengl_bindcode(GPUTexture *tex);
+int GPU_texture_opengl_bindcode(const GPUTexture *tex);
unsigned char *GPU_texture_dup_pixels(const GPUTexture *tex, size_t *count_out);
Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_deprecated.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_deprecated.h 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_deprecated.h 2013-07-21 20:07:18 UTC (rev 58487)
@@ -525,16 +525,16 @@
#define DO_NOT_USE_GL_COLOR_MATERIAL
/* display lists */
-#undef glCallList
-#define glCallList DO_NOT_USE_glCallList
-#undef glEndList
-#define glEndList DO_NOT_USE_glEndList
-#undef glGenLists
-#define glGenLists DO_NOT_USE_glGenLists
-#undef glListBase
-#define glListBase DO_NOT_USE_glListBase
-#undef glNewList
-#define glNewList DO_NOT_USE_glNewList
+//#undef glCallList
+//#define glCallList DO_NOT_USE_glCallList
+//#undef glEndList
+//#define glEndList DO_NOT_USE_glEndList
+//#undef glGenLists
+//#define glGenLists DO_NOT_USE_glGenLists
+//#undef glListBase
+//#define glListBase DO_NOT_USE_glListBase
+//#undef glNewList
+//#define glNewList DO_NOT_USE_glNewList
/* GLU */
#undef gluUnProject
Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_draw.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_draw.c 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_draw.c 2013-07-21 20:07:18 UTC (rev 58487)
@@ -2033,4 +2033,8 @@
/* calling this makes drawing very slow when AA is not set up in ghost
* on Linux/NVIDIA. */
// glDisable(GL_MULTISAMPLE);
+
+ /* make sure double side isn't used by default and only getting enabled in places where it's
+ * really needed to prevent different unexpected behaviors like with intel gme965 card (sergey) */
+ gpuLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
}
Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extensions.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extensions.c 2013-07-21 19:06:17 UTC (rev 58486)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extensions.c 2013-07-21 20:07:18 UTC (rev 58487)
@@ -256,10 +256,6 @@
}
}
- /* make sure double side isn't used by default and only getting enabled in places where it's
- * really needed to prevent different unexpected behaviors like with intel gme965 card (sergey) */
- gpuLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
#ifdef _WIN32
GG.os = GPU_OS_WIN;
#elif defined(__APPLE__)
@@ -697,9 +693,9 @@
tex->h = h - border;
gpuBindTexture(GL_TEXTURE_2D, lastbindcode);
-
- return tex;
}
+
+ return tex;
}
GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap)
@@ -907,7 +903,7 @@
return tex->h;
}
-int GPU_texture_opengl_bindcode(GPUTexture *tex)
+int GPU_texture_opengl_bindcode(const GPUTexture *tex)
{
return tex->bindcode;
}
@@ -932,10 +928,12 @@
#if !defined(GLEW_NO_ES)
memcpy(texpixels, tex->pixels, 4*(*count));
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list