[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58484] branches/soc-2013-viewport_fx: Found up several functions that really were ES2, Fixed linking problems with EGL/GLESv2, stubbed out Win32 GHOST in preparation for adding EGL support.

Jason Wilkins Jason.A.Wilkins at gmail.com
Sun Jul 21 19:44:01 CEST 2013


Revision: 58484
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58484
Author:   jwilkins
Date:     2013-07-21 17:44:01 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
Found up several functions that really were ES2, Fixed linking problems with EGL/GLESv2, stubbed out Win32 GHOST in preparation for adding EGL support.

Blender compiles, but now crashes on startup due to NULL OpenGL function pointers.  

Modified Paths:
--------------
    branches/soc-2013-viewport_fx/CMakeLists.txt
    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/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2013-viewport_fx/source/blender/blenkernel/BKE_displist.h
    branches/soc-2013-viewport_fx/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-viewport_fx/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2013-viewport_fx/source/blender/blenkernel/intern/editderivedmesh.c
    branches/soc-2013-viewport_fx/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/soc-2013-viewport_fx/source/blender/editors/armature/editarmature_sketch.c
    branches/soc-2013-viewport_fx/source/blender/editors/armature/reeb.c
    branches/soc-2013-viewport_fx/source/blender/editors/gpencil/drawgpencil.c
    branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_icons.c
    branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_widgets.c
    branches/soc-2013-viewport_fx/source/blender/editors/mask/mask_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/mesh/editmesh_knife.c
    branches/soc-2013-viewport_fx/source/blender/editors/screen/glutil.c
    branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_cursor.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_graph/graph_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawanimviz.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawarmature.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawmesh.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawvolume.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/view3d_view.c
    branches/soc-2013-viewport_fx/source/blender/editors/transform/transform.c
    branches/soc-2013-viewport_fx/source/blender/editors/transform/transform_manipulator.c
    branches/soc-2013-viewport_fx/source/blender/editors/uvedit/uvedit_draw.c
    branches/soc-2013-viewport_fx/source/blender/editors/uvedit/uvedit_smart_stitch.c
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_compatibility.h
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_object.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_buffers.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_draw.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_lighting.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_object_gl11.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_object_gl11.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_primitives.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_profile.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_select.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_select.h
    branches/soc-2013-viewport_fx/source/blender/python/generic/bgl.c
    branches/soc-2013-viewport_fx/source/blender/python/generic/bgl.h
    branches/soc-2013-viewport_fx/source/blender/windowmanager/intern/wm_draw.c
    branches/soc-2013-viewport_fx/source/blender/windowmanager/intern/wm_window.c
    branches/soc-2013-viewport_fx/source/creator/CMakeLists.txt
    branches/soc-2013-viewport_fx/source/creator/creator.c

Modified: branches/soc-2013-viewport_fx/CMakeLists.txt
===================================================================
--- branches/soc-2013-viewport_fx/CMakeLists.txt	2013-07-21 17:16:04 UTC (rev 58483)
+++ branches/soc-2013-viewport_fx/CMakeLists.txt	2013-07-21 17:44:01 UTC (rev 58484)
@@ -1960,24 +1960,22 @@
 
 if(WIN32)
 	# ToDo: Add ANGLE to the lib directory
-	set(ANGLE_INCLUDE_PATH "" CACHE PATH     "Path to ANGLE include files")
-	set(ANGLE_LIBRARY      "" CACHE FILEPATH "ANGLE library file")
+	set(ANGLE_INCLUDE_PATH   "" CACHE PATH     "Path to ANGLE include files")
+	set(ANGLE_GLESv2_LIBRARY "" CACHE FILEPATH "ANGLE OpenGL ES 2.0 library file")
+	set(ANGLE_EGL_LIBRARY    "" CACHE FILEPATH "ANGLE EGL library file")
+	set(ANGLE_GLESv2_DLL     "" CACHE FILEPATH "ANGLE OpenGL ES 2.0 dynamic link library file")
+	set(ANGLE_EGL_DLL        "" CACHE FILEPATH "ANGLE EGL library dynamic link file")
 
 	mark_as_advanced(
 		ANGLE_INCLUDE_PATH
-		ANGLE_LIBRARY
+		ANGLE_GLESv2_LIBRARY
+		ANGLE_EGL_LIBRARY
+		ANGLE_GLESv2_DLL
+		ANGLE_EGL_DLL
 	)
 endif()
 
-if(WITH_GL_SYSTEM_EMBEDDED)
-	if(WITH_ANGLE)
-		#set(SYSTEM_GL_INCLUDE_DIR "${ANGLE_INCLUDE_PATH}")
-		set(SYSTEM_GL_LIBRARIES   "${ANGLE_LIBRARY}")
-	else()
-		#set(SYSTEM_GL_INCLUDE_PATH "${OES2_INCLUDE_PATH}")
-		set(SYSTEM_GL_LIBRARIES    "${OES2_LIBRARY}")
-	endif()
-else(WITH_GL_SYSTEM_LEGACY OR WITH_GL_SYSTEM_DESKTOP)
+if(WITH_GL_SYSTEM_LEGACY OR WITH_GL_SYSTEM_DESKTOP)
 	find_package(OpenGL)
 
 	#set(SYSTEM_GL_INCLUDE_DIR "${OPENGL_INCLUDE_DIR}")
@@ -1986,6 +1984,15 @@
 	if(WITH_GLU)
 		list(APPEND SYSTEM_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
 	endif()
+elseif(WITH_GL_SYSTEM_EMBEDDED)
+	if(WITH_ANGLE)
+		#set(SYSTEM_GL_INCLUDE_DIR "${ANGLE_INCLUDE_PATH}")
+		set(SYSTEM_GL_LIBRARIES   "${ANGLE_GLESv2_LIBRARY}")
+		list(APPEND SYSTEM_GL_LIBRARIES "${ANGLE_EGL_LIBRARY}")
+	else()
+		#set(SYSTEM_GL_INCLUDE_PATH "${OES2_INCLUDE_PATH}")
+		set(SYSTEM_GL_LIBRARIES    "${OES2_LIBRARY}")
+	endif()
 endif()
 
 #blender_include_dirs_sys("${SYSTEM_GL_INCLUDE_DIR}")

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 17:16:04 UTC (rev 58483)
+++ branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glesew.h	2013-07-21 17:44:01 UTC (rev 58484)
@@ -64,6 +64,26 @@
 #error glesew.h included instead of glew.h
 #endif
 
+// XXX jwilkins: changing versions from 'ifdef' to 'if' requires setting defaults
+#ifndef GL_ES_VERSION_1_0 // XXX
+#define GL_ES_VERSION_1_0 1 // XXX
+#endif // XXX
+
+// XXX jwilkins: changing versions from 'ifdef' to 'if' requires setting defaults
+#ifndef GL_ES_VERSION_CL_1_1 // XXX
+#define GL_ES_VERSION_CL_1_1 1 // XXX
+#endif // XXX
+
+// XXX jwilkins: changing versions from 'ifdef' to 'if' requires setting defaults
+#ifndef GL_ES_VERSION_CM_1_1 // XXX
+#define GL_ES_VERSION_CM_1_1 1 // XXX
+#endif // XXX
+
+// XXX jwilkins: changing versions from 'ifdef' to 'if' requires setting defaults
+#ifndef GL_ES_VERSION_2_0 // XXX
+#define GL_ES_VERSION_2_0 1 // XXX
+#endif // XXX
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -508,15 +528,21 @@
 
 /*************************************************************/
 
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glAlphaFunc (GLenum func, GLclampf ref);
+#endif // XXX
 GLAPI void GLAPIENTRY glBindTexture (GLenum target, GLuint texture);
 GLAPI void GLAPIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
 GLAPI void GLAPIENTRY glClear (GLbitfield mask);
 GLAPI void GLAPIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
 GLAPI void GLAPIENTRY glClearStencil (GLint s);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+#endif
 GLAPI void GLAPIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
 GLAPI void GLAPIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
 GLAPI void GLAPIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
 GLAPI void GLAPIENTRY glCullFace (GLenum mode);
@@ -524,26 +550,35 @@
 GLAPI void GLAPIENTRY glDepthFunc (GLenum func);
 GLAPI void GLAPIENTRY glDepthMask (GLboolean flag);
 GLAPI void GLAPIENTRY glDisable (GLenum cap);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glDisableClientState (GLenum array);
+#endif
 GLAPI void GLAPIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
 GLAPI void GLAPIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
 GLAPI void GLAPIENTRY glEnable (GLenum cap);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glEnableClientState (GLenum array);
+#endif 
 GLAPI void GLAPIENTRY glFinish (void);
 GLAPI void GLAPIENTRY glFlush (void);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glFogf (GLenum pname, GLfloat param);
 GLAPI void GLAPIENTRY glFogfv (GLenum pname, const GLfloat *params);
+#endif
 GLAPI void GLAPIENTRY glFrontFace (GLenum mode);
 GLAPI void GLAPIENTRY glGenTextures (GLsizei n, GLuint *textures);
 GLAPI GLenum GLAPIENTRY glGetError (void);
 GLAPI void GLAPIENTRY glGetIntegerv (GLenum pname, GLint *params);
 GLAPI const GLubyte * GLAPIENTRY glGetString (GLenum name);
 GLAPI void GLAPIENTRY glHint (GLenum target, GLenum mode);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glLightModelf (GLenum pname, GLfloat param);
 GLAPI void GLAPIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
 GLAPI void GLAPIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
 GLAPI void GLAPIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
+#endif
 GLAPI void GLAPIENTRY glLineWidth (GLfloat width);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glLoadIdentity (void);
 GLAPI void GLAPIENTRY glLoadMatrixf (const GLfloat *m);
 GLAPI void GLAPIENTRY glLogicOp (GLenum opcode);
@@ -554,33 +589,45 @@
 GLAPI void GLAPIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
 GLAPI void GLAPIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
 GLAPI void GLAPIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
 GLAPI void GLAPIENTRY glPixelStorei (GLenum pname, GLint param);
-GLAPI void GLAPIENTRY glPointSize (GLfloat size);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
+GLAPI void GLAPIENTRY gpuSpriteSize (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
 GLAPI void GLAPIENTRY glPopMatrix (void);
 GLAPI void GLAPIENTRY glPushMatrix (void);
+#endif
 GLAPI void GLAPIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
 GLAPI void GLAPIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
+#endif
 GLAPI void GLAPIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glShadeModel (GLenum mode);
+#endif // XXX
 GLAPI void GLAPIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
 GLAPI void GLAPIENTRY glStencilMask (GLuint mask);
 GLAPI void GLAPIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
 GLAPI void GLAPIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
 GLAPI void GLAPIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
+#endif
 GLAPI void GLAPIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
 GLAPI void GLAPIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
 GLAPI void GLAPIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+#if !GL_ES_VERSION_2_0 // XXX jwilkins: not in all versions of ES
 GLAPI void GLAPIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
 GLAPI void GLAPIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
 GLAPI void GLAPIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
 
-
 /* --------------------------- GL_ES_VERSION_1_0 --------------------------- */
 
-#if !defined(GL_ES_VERSION_1_0) 
+#if GL_ES_VERSION_1_0 // XXX jwilkins: should be if not ifdef
 #define GL_ES_VERSION_1_0 1
 
 typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);
@@ -671,7 +718,7 @@
 
 /* -------------------------- GL_ES_VERSION_CL_1_1 ------------------------- */
 
-#if !defined(GL_ES_VERSION_CL_1_1) 
+#if GL_ES_VERSION_CL_1_1 // XXX jwilkins: should be if not ifdef
 #define GL_ES_VERSION_CL_1_1 1
 
 #define GL_VERSION_ES_CL_1_1 0x1
@@ -857,7 +904,7 @@
 
 /* -------------------------- GL_ES_VERSION_CM_1_1 ------------------------- */
 
-#if !defined(GL_ES_VERSION_CM_1_1) 
+#if GL_ES_VERSION_CM_1_1 // XXX jwilkins: should be if not ifdef
 #define GL_ES_VERSION_CM_1_1 1
 
 #define GL_VERSION_ES_CM_1_1 0x1
@@ -893,7 +940,7 @@
 
 /* --------------------------- GL_ES_VERSION_2_0 --------------------------- */
 
-#if !defined(GL_ES_VERSION_2_0) 
+#if GL_ES_VERSION_2_0 // XXX jwilkins: should be if not ifdef
 #define GL_ES_VERSION_2_0 1
 
 #define GL_NONE 0

Modified: branches/soc-2013-viewport_fx/extern/glew-es/include/GL/glew.h

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list