[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11871] branches/soc-2007-maike/source/ blender/src: Apple bugfix, GLsizei is long for this arch not int as for the others.

Miguel Torres Lima torreslima at gmail.com
Tue Aug 28 17:19:33 CEST 2007


Revision: 11871
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11871
Author:   maike
Date:     2007-08-28 17:19:32 +0200 (Tue, 28 Aug 2007)

Log Message:
-----------
Apple bugfix, GLsizei is long for this arch not int as for the others.

Modified Paths:
--------------
    branches/soc-2007-maike/source/blender/src/glsl_program.c
    branches/soc-2007-maike/source/blender/src/glsl_shader_util.c
    branches/soc-2007-maike/source/blender/src/glutil.c

Modified: branches/soc-2007-maike/source/blender/src/glsl_program.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/glsl_program.c	2007-08-28 15:01:53 UTC (rev 11870)
+++ branches/soc-2007-maike/source/blender/src/glsl_program.c	2007-08-28 15:19:32 UTC (rev 11871)
@@ -56,7 +56,11 @@
 
 static int glsl_prog_link(GLuint program)
 {
+#ifdef __APPLE__
+  long linked;
+#else
   int linked;
+#endif
 
   glLinkProgram(program);
   glGetProgramiv(program, GL_LINK_STATUS, &linked);

Modified: branches/soc-2007-maike/source/blender/src/glsl_shader_util.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/glsl_shader_util.c	2007-08-28 15:01:53 UTC (rev 11870)
+++ branches/soc-2007-maike/source/blender/src/glsl_shader_util.c	2007-08-28 15:19:32 UTC (rev 11871)
@@ -31,8 +31,13 @@
 
 GLuint glsl_create_GLshader(char *code, int type, int str_num)
 {
-  GLuint shader = glCreateShader(type);  
+  GLuint shader = glCreateShader(type);
+
+#ifdef __APPLE__
+  long compiled;
+#else
   int compiled;
+#endif
 
   glShaderSource(shader, str_num, (const GLchar **) &code, NULL);
   glCompileShader(shader);
@@ -69,7 +74,11 @@
 void print_GLlog(GLuint prog, short type)
 {
   GLint p = 0;
+#ifdef __APPLE__
+  long c = 0;
+#else
   int c = 0;
+#endif
   char *log;
   
   if(type == GLSL_PROGRAM_LOG)

Modified: branches/soc-2007-maike/source/blender/src/glutil.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/glutil.c	2007-08-28 15:01:53 UTC (rev 11870)
+++ branches/soc-2007-maike/source/blender/src/glutil.c	2007-08-28 15:19:32 UTC (rev 11871)
@@ -718,8 +718,13 @@
   gl_extensions = glGetString(GL_EXTENSIONS);
 
   if(strstr((char *) gl_extensions, v_ext) != NULL && strstr((char *) gl_extensions, f_ext) != NULL){
+#ifdef __APPLE__
+    long iparams[7];
+    long iparams2[7];
+#else
     int iparams[7]; 
     int iparams2[7];
+#endif
 
     glsl_state = GLSL_SUPPORTED;
     initialized = 1;





More information about the Bf-blender-cvs mailing list