[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58370] branches/soc-2013-viewport_fx: not really a stopping point, but checking in so that I can change my physical location

Jason Wilkins Jason.A.Wilkins at gmail.com
Thu Jul 18 19:08:23 CEST 2013


Revision: 58370
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58370
Author:   jwilkins
Date:     2013-07-18 17:08:23 +0000 (Thu, 18 Jul 2013)
Log Message:
-----------
not really a stopping point, but checking in so that I can change my physical location

Modified Paths:
--------------
    branches/soc-2013-viewport_fx/CMakeLists.txt
    branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_icons.c
    branches/soc-2013-viewport_fx/source/blender/gpu/CMakeLists.txt
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_colors.h
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_matrix.h
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_object.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_codegen.c
    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_glew.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate_gl11.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate_glsl.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_immediate_internal.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_lighting.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_lighting_gl11.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_material.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_matrix.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_object.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_object_gles.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_object_gles.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_view_gl.c
    branches/soc-2013-viewport_fx/source/blender/windowmanager/intern/wm_draw.c
    branches/soc-2013-viewport_fx/source/blender/windowmanager/intern/wm_init_exit.c

Added Paths:
-----------
    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.h

Removed Paths:
-------------
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_functions.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_functions.c

Modified: branches/soc-2013-viewport_fx/CMakeLists.txt
===================================================================
--- branches/soc-2013-viewport_fx/CMakeLists.txt	2013-07-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/CMakeLists.txt	2013-07-18 17:08:23 UTC (rev 58370)
@@ -296,9 +296,12 @@
 
 # OpenGL
 
-option(WITH_GL_EXPERIMENTAL_GLEW "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
-mark_as_advanced(WITH_GL_EXPERIMENTAL_GLEW)
+option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
+mark_as_advanced(WITH_GLEW_ES)
 
+option(WITH_GLU "Provide the GL Utility Library (GLU). Only works with the 'compatibiity' profile. (deprecated)" ON)
+mark_as_advanced(WITH_GLU_ES)
+
 option(WITH_GL_SYSTEM_LEGACY "Support using AGL/WGL/XGL system library (without extensions) to initialize OpenGL. Can only access pre 3.1 'legacy' profile. (deprecated)" ON)
 mark_as_advanced(WITH_GL_SYSTEM_LEGACY)
 
@@ -308,8 +311,8 @@
 option(WITH_GL_SYSTEM_EMBEDDED "Support using the EGL system library to initialize OpenGL ES." OFF)
 mark_as_advanced(WITH_GL_SYSTEM_EMBEDDED)
 
-option(WITH_GL_PROFILE_COMPATIBILITY "Support using the OpenGL 'compatibility' profile. (deprecated)" ON)
-mark_as_advanced(WITH_GL_PROFILE_COMPATIBILITY)
+option(WITH_GL_PROFILE_COMPAT "Support using the OpenGL 'compatibility' profile. (deprecated)" ON)
+mark_as_advanced(WITH_GL_PROFILE_COMPAT)
 
 option(WITH_GL_PROFILE_CORE "Support using the OpenGL 3.1+ 'core' profile." OFF)
 mark_as_advanced(WITH_GL_PROFILE_CORE)
@@ -1984,15 +1987,15 @@
 	set(SYSTEM_GL_INCLUDE_DIR "${OPENGL_INCLUDE_DIR}")
 	set(SYSTEM_GL_LIBRARIES   "${OPENGL_gl_LIBRARY}")
 
-	if(WITH_GL_SYSTEM_LEGACY)
+	if(WITH_GLU)
 		list(APPEND SYSTEM_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
 	endif()
 endif()
 
 blender_include_dirs_sys("${SYSTEM_GL_INCLUDE_DIR}")
 
-if(WITH_GL_PROFILE_COMPATIBILITY)
-	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_PROFILE_COMPATIBILITY")
+if(WITH_GL_PROFILE_COMPAT)
+	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_PROFILE_COMPAT")
 endif()
 
 if(WITH_GL_PROFILE_CORE)
@@ -2003,6 +2006,18 @@
 	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_PROFILE_ES20")
 endif()
 
+if(WITH_GL_SYSTEM_LEGACY)
+	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_SYSTEM_LEGACY")
+endif()
+
+if(WITH_GL_SYSTEM_DESKTOP)
+	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_SYSTEM_DESKTOP")
+endif()
+
+if(WITH_GL_SYSTEM_EMBEDDED)
+	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GL_SYSTEM_EMBEDDED")
+endif()
+
 if(WITH_GPU_SAFETY)
 	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GPU_SAFETY")
 endif()
@@ -2045,14 +2060,16 @@
 else()
 	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_STATIC")
 
-	if(WITH_GL_EXPERIMENTAL_GLEW)
+	if(WITH_GLEW_ES)
 		set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
 
+		set(GL_DEFINITIONS "${GL_DEFINITIONS} -DWITH_GLEW_ES")
+
 		# this isn't strictly required, but potentally makes GLEW smaller and helps catch unguarded API usage
 		if(NOT WITH_GL_PROFILE_ES20)
 			# no es functions are needed
 			set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_NO_ES")
-		elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPATIBILITY))
+		elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPAT))
 			# es is enabled, but the other functions are all disabled
 			set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_ES_ONLY")
 		endif()
@@ -2069,7 +2086,7 @@
 	endif()
 endif()
 
-if(NOT WITH_GL_SYSTEM_LEGACY)
+if(NOT WITH_GLU)
 	set(GL_DEFINITIONS "${GL_DEFINITIONS} -DGLEW_NO_GLU")
 endif()
 
@@ -2428,11 +2445,11 @@
 	info_cfg_option(WITH_MOD_OCEANSIM)
 
 	info_cfg_text("OpenGL:")
-	info_cfg_option(WITH_GL_EXPERIMENTAL_GLEW)
+	info_cfg_option(WITH_GLEW_ES)
 	info_cfg_option(WITH_GL_SYSTEM_LEGACY)
 	info_cfg_option(WITH_GL_SYSTEM_DESKTOP)
 	info_cfg_option(WITH_GL_SYSTEM_EMBEDDED)
-	info_cfg_option(WITH_GL_PROFILE_COMPATIBILITY)
+	info_cfg_option(WITH_GL_PROFILE_COMPAT)
 	info_cfg_option(WITH_GL_PROFILE_CORE)
 	info_cfg_option(WITH_GL_PROFILE_ES20)
 	info_cfg_option(WITH_GPU_SAFETY)

Modified: branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_icons.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_icons.c	2013-07-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/source/blender/editors/interface/interface_icons.c	2013-07-18 17:08:23 UTC (rev 58370)
@@ -1056,6 +1056,7 @@
 	}
 }
 
+//#include REAL_GL_MODE
 static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy,
                               int UNUSED(iw), int ih, float alpha, const float rgb[3])
 {
@@ -1072,7 +1073,6 @@
 	x2 = (ix + ih) * icongltex.invw;
 	y1 = iy * icongltex.invh;
 	y2 = (iy + ih) * icongltex.invh;
-//#include REAL_GL_MODE
 	glEnable(GL_TEXTURE_2D);
 	glBindTexture(GL_TEXTURE_2D, icongltex.id);
 
@@ -1101,9 +1101,9 @@
 	glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f);
 
 	glBindTexture(GL_TEXTURE_2D, 0);
-//#include FAKE_GL_MODE
 	glDisable(GL_TEXTURE_2D);
 }
+//#include FAKE_GL_MODE
 
 /* Drawing size for preview images */
 static int get_draw_size(enum eIconSizes size)

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/CMakeLists.txt
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/CMakeLists.txt	2013-07-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/CMakeLists.txt	2013-07-18 17:08:23 UTC (rev 58370)
@@ -50,6 +50,7 @@
 	intern/gpu_debug.c
 	intern/gpu_draw.c
 	intern/gpu_extensions.c
+	intern/gpu_extension_wrapper.c
 	intern/gpu_immediate.c
 	intern/gpu_immediate_glsl.c
 	intern/gpu_immediate_gl11.c
@@ -64,7 +65,6 @@
 	intern/gpu_object.c
 	intern/gpu_object_gles.c
 	intern/gpu_object_gl11.c
-	intern/gpu_functions.c
 	intern/gpu_view.c
 	intern/gpu_view_gl.c
 
@@ -79,10 +79,10 @@
 	GPU_matrix.h
 	GPU_primitives.h
 	GPU_object.h
-	GPU_functions.h
 
 	intern/gpu_codegen.h
 	intern/gpu_deprecated.h
+	intern/gpu_extension_wrapper.h
 	intern/gpu_glew.h
 	intern/gpu_immediate.h
 	intern/gpu_immediate_inline.h

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/GPU_colors.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/GPU_colors.h	2013-07-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/GPU_colors.h	2013-07-18 17:08:23 UTC (rev 58370)
@@ -29,6 +29,9 @@
  *  \ingroup gpu
  */
 
+#ifndef __GPU_COLORS__
+#define __GPU_COLORS__
+
 #define CPACK_BLACK   0x000000
 #define CPACK_WHITE   0xFFFFFF
 
@@ -39,3 +42,5 @@
 #define CPACK_YELLOW  0xFFFF00
 #define CPACK_CYAN    0x00FFFF
 #define CPACK_MAGENTA 0xFF00FF
+
+#endif

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-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h	2013-07-18 17:08:23 UTC (rev 58370)
@@ -36,35 +36,14 @@
 extern "C" {
 #endif
 
-extern unsigned int GPU_ext_config ;
-extern unsigned int GPU_gl_type ;
-
-#define GPU_EXT_GLSL (1<<0)
-#define GPU_EXT_GLSL_ENABLED (GPU_ext_config & GPU_EXT_GLSL)
-#define GPU_EXT_GLSL_VERTEX (1<<1)
-#define GPU_EXT_GLSL_VERTEX_ENABLED (GPU_ext_config & GPU_EXT_GLSL_VERTEX)
-#define GPU_EXT_GLSL_FRAGMENT (1<<2)
-#define GPU_EXT_GLSL_FRAGMENT_ENABLED (GPU_ext_config & GPU_EXT_GLSL_FRAGMENT)
-#define GPU_EXT_FRAMEBUFFERS (1<<3)
-#define GPU_EXT_FRAMEBUFFERS_ENABLED (GPU_ext_config & GPU_EXT_FRAMEBUFFERS)
-#define GPU_EXT_MAPBUFFER (1<<4)
-#define GPU_EXT_MAPBUFFER_ENABLED (GPU_ext_config & GPU_EXT_MAPBUFFER)
-
-#ifdef WITH_GLES
-#define GPU_GLTYPE_FIXED_ENABLED (0)
-#else
-#define GPU_GLTYPE_FIXED (1<<0)
-#define GPU_GLTYPE_FIXED_ENABLED (GPU_gl_type & GPU_GLTYPE_FIXED)
-#endif
-
 /* GPUShader */
 
 struct GPUShader {
-	unsigned int object;		/* handle for full shader */
-	unsigned int vertex;		/* handle for vertex shader */
-	unsigned int fragment;	/* handle for fragment shader */
-	unsigned int lib;		/* handle for libment shader */
-	int totattrib;			/* total number of attributes */
+	unsigned int object;   /* handle for full shader     */
+	unsigned int vertex;   /* handle for vertex shader   */
+	unsigned int fragment; /* handle for fragment shader */
+	unsigned int lib;      /* handle for libment shader  */
+	int totattrib;         /* total number of attributes */
 };
 
 struct Image;
@@ -86,7 +65,6 @@
 /* GPU extensions support */
 
 void GPU_extensions_disable(void);
-void GPU_init_graphics_type(void);
 void GPU_extensions_init(void); /* call this before running any of the functions below */
 void GPU_extensions_exit(void);
 int GPU_print_error(const char *str);
@@ -235,6 +213,8 @@
 	int totlayer;
 } GPUVertexAttribs;
 
+int GPU_max_textures(void);
+
 #ifdef __cplusplus
 }
 #endif

Deleted: branches/soc-2013-viewport_fx/source/blender/gpu/GPU_functions.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/GPU_functions.h	2013-07-18 16:35:22 UTC (rev 58369)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/GPU_functions.h	2013-07-18 17:08:23 UTC (rev 58370)
@@ -1,294 +0,0 @@
-/* ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2012 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Jason Wilkins.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/gpu/GPU_functions.h

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list