[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58974] branches/soc-2013-viewport_fx/ source/blender/gpu/intern: Some changes to compile for ES, but it crashes.

Jason Wilkins Jason.A.Wilkins at gmail.com
Tue Aug 6 23:25:48 CEST 2013


Revision: 58974
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58974
Author:   jwilkins
Date:     2013-08-06 21:25:48 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
Some changes to compile for ES, but it crashes.  Need to try on ANGLE, so committing so I can move over to other computer.

Modified Paths:
--------------
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extension_wrapper.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.h

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extension_wrapper.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extension_wrapper.c	2013-08-06 20:31:20 UTC (rev 58973)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extension_wrapper.c	2013-08-06 21:25:48 UTC (rev 58974)
@@ -293,6 +293,7 @@
 
 static void init_vertex_arrays(void)
 {
+#if !defined(GLEW_ES_ONLY)
 	if (GLEW_VERSION_3_0 || GLEW_ARB_vertex_array_object) {
 		gpu_glGenVertexArrays    = glGenVertexArrays;
 		gpu_glBindVertexArray    = glBindVertexArray;
@@ -300,6 +301,7 @@
 
 		return;
 	}
+#endif
 
 #if !defined(GLEW_NO_ES)
 	if (GLEW_OES_vertex_array_object) {
@@ -413,11 +415,16 @@
 	if (!init_vertex_program())
 		*glslsupport_out = false;
 
-	if (!(GLEW_ARB_multitexture || GLEW_VERSION_1_3))
+	if (!(GLEW_ARB_multitexture || GLEW_VERSION_1_3 || GLEW_ES_VERSION_2_0)) // Note: This should mean only the non-deprecated parts of the extension
 		*glslsupport_out = false;
 
 	*framebuffersupport_out = init_framebuffer_object();
+#else
+	*glslsupport_out = false;
+	*framebuffersupport_out = false;
+#endif
 
+#if 1
 	init_vertex_arrays();
 	init_buffers();
 	init_mapbuffer();
@@ -437,9 +444,6 @@
 
 	init_generate_mipmap();
 #else
-	*glslsupport_out = false;
-	*framebuffersupport_out = false;
-
 	GPU_buffer_start_update  = GPU_buffer_start_update_dummy;
 	GPU_buffer_finish_update = GPU_buffer_finish_update_dummy;
 #endif

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.h	2013-08-06 20:31:20 UTC (rev 58973)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.h	2013-08-06 21:25:48 UTC (rev 58974)
@@ -507,10 +507,18 @@
 #define GL_QUADS 0x0007
 #endif
 
+#ifndef GL_QUAD_STRIP
+#define GL_QUAD_STRIP 0x0008
 #endif
 
+#ifndef GL_POLYGON
+#define GL_POLYGON 0x0009
+#endif
 
+#endif
 
+
+
 #ifdef __cplusplus
 }
 #endif




More information about the Bf-blender-cvs mailing list