[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14904] branches/apricot: Apricot Branch

Brecht Van Lommel brechtvanlommel at pandora.be
Tue May 20 15:31:32 CEST 2008


Revision: 14904
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14904
Author:   blendix
Date:     2008-05-20 15:31:31 +0200 (Tue, 20 May 2008)

Log Message:
-----------
Apricot Branch
==============

Fixes for compiling on Windows related to glew, snprintf
and the outliner, tested with CMake + MSVC 2008.

Modified Paths:
--------------
    branches/apricot/extern/glew/include/GL/glew.h
    branches/apricot/source/blender/gpu/intern/gpu_codegen.c
    branches/apricot/source/blender/src/outliner.c

Modified: branches/apricot/extern/glew/include/GL/glew.h
===================================================================
--- branches/apricot/extern/glew/include/GL/glew.h	2008-05-20 12:45:54 UTC (rev 14903)
+++ branches/apricot/extern/glew/include/GL/glew.h	2008-05-20 13:31:31 UTC (rev 14904)
@@ -58,6 +58,9 @@
 ** version 1.2.1 Specification.
 */
 
+/* added this here for blender, should be moved elsewhere */
+#define GLEW_STATIC
+
 #ifndef __glew_h__
 #define __glew_h__
 #define __GLEW_H__

Modified: branches/apricot/source/blender/gpu/intern/gpu_codegen.c
===================================================================
--- branches/apricot/source/blender/gpu/intern/gpu_codegen.c	2008-05-20 12:45:54 UTC (rev 14903)
+++ branches/apricot/source/blender/gpu/intern/gpu_codegen.c	2008-05-20 13:31:31 UTC (rev 14904)
@@ -56,8 +56,13 @@
 #include <stdarg.h>
 
 #ifdef _WIN32
+#ifndef snprintf
 #define _vsnprintf vsnprintf
 #endif
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
+#endif
 
 static char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
 	0, 0, 0, 0, "mat3", 0, 0, 0, 0, 0, 0, "mat4"};

Modified: branches/apricot/source/blender/src/outliner.c
===================================================================
--- branches/apricot/source/blender/src/outliner.c	2008-05-20 12:45:54 UTC (rev 14903)
+++ branches/apricot/source/blender/src/outliner.c	2008-05-20 13:31:31 UTC (rev 14904)
@@ -552,17 +552,18 @@
 	LinkNode *l = NULL, *names = NULL;
 	char *blockname;
 	int blocktype = 0;
+	TreeElement *tenla;
 	
 	
 	if (!lib->filedata) {
-		lib->filedata = BLO_blendhandle_from_file(lib->filename);
+		lib->filedata = (void*)BLO_blendhandle_from_file(lib->filename);
 	}
 	
 	if (!lib->filedata) {
 		return;
 	}
 	
-	names = BLO_blendhandle_get_linkable_groups( lib->filedata );
+	names = BLO_blendhandle_get_linkable_groups( (BlendHandle*)lib->filedata );
 	if( !names ) return;	
 		
 	for( l = names; l; l = l->next ) {
@@ -592,7 +593,7 @@
 		
 		blockname =  BLO_idcode_to_name( blocktype );
 		
-		TreeElement *tenla= outliner_add_element(soops, lb, lib, te, TSE_LIBRARY_MEMBER_BASE, 0);
+		tenla= outliner_add_element(soops, lb, lib, te, TSE_LIBRARY_MEMBER_BASE, 0);
 		
 		tenla->name = blockname; /* Use this because blockname is free'd */
 		
@@ -1942,7 +1943,7 @@
 			if (!group_iter) {
 			
 				if (!lib->filedata) {
-					lib->filedata = BLO_blendhandle_from_file(lib->filename);
+					lib->filedata = (void*)BLO_blendhandle_from_file(lib->filename);
 				}
 				bh = (BlendHandle *)lib->filedata;
 			
@@ -2004,7 +2005,7 @@
 			BlendHandle  *bh = NULL;
 			
 			if (!lib->filedata) {
-				lib->filedata = BLO_blendhandle_from_file(lib->filename);
+				lib->filedata = (void*)BLO_blendhandle_from_file(lib->filename);
 			}
 			bh = (BlendHandle *)lib->filedata;
 			





More information about the Bf-blender-cvs mailing list