[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47587] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern: Default alpha for GLubyte is 255, not 1 (!)

Jason Wilkins Jason.A.Wilkins at gmail.com
Thu Jun 7 21:56:39 CEST 2012


Revision: 47587
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47587
Author:   jwilkins
Date:     2012-06-07 19:56:38 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
Default alpha for GLubyte is 255, not 1 (!)

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c	2012-06-07 19:24:49 UTC (rev 47586)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c	2012-06-07 19:56:38 UTC (rev 47587)
@@ -723,7 +723,7 @@
 	GPU_IMMEDIATE->color[0] = (GLubyte)(255.0f * r);
 	GPU_IMMEDIATE->color[1] = (GLubyte)(255.0f * g);
 	GPU_IMMEDIATE->color[2] = (GLubyte)(255.0f * b);
-	GPU_IMMEDIATE->color[3] = 1;
+	GPU_IMMEDIATE->color[3] = 255;
 
 	GPU_IMMEDIATE->currentColor();
 }
@@ -735,7 +735,7 @@
 	GPU_IMMEDIATE->color[0] = (GLubyte)(255.0f * v[0]);
 	GPU_IMMEDIATE->color[1] = (GLubyte)(255.0f * v[1]);
 	GPU_IMMEDIATE->color[2] = (GLubyte)(255.0f * v[2]);
-	GPU_IMMEDIATE->color[3] = 1;
+	GPU_IMMEDIATE->color[3] = 255;
 
 	GPU_IMMEDIATE->currentColor();
 }

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h	2012-06-07 19:24:49 UTC (rev 47586)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h	2012-06-07 19:56:38 UTC (rev 47587)
@@ -71,7 +71,7 @@
 	GPU_IMMEDIATE->color[0] = (GLubyte)(255.0f * r);
 	GPU_IMMEDIATE->color[1] = (GLubyte)(255.0f * g);
 	GPU_IMMEDIATE->color[2] = (GLubyte)(255.0f * b);
-	GPU_IMMEDIATE->color[3] = 1;
+	GPU_IMMEDIATE->color[3] = 255;
 }
 
 BLI_INLINE void gpuColor3fv(const GLfloat *restrict v)
@@ -81,7 +81,7 @@
 	GPU_IMMEDIATE->color[0] = (GLubyte)(255.0f * v[0]);
 	GPU_IMMEDIATE->color[1] = (GLubyte)(255.0f * v[1]);
 	GPU_IMMEDIATE->color[2] = (GLubyte)(255.0f * v[2]);
-	GPU_IMMEDIATE->color[3] = 1;
+	GPU_IMMEDIATE->color[3] = 255;
 }
 
 BLI_INLINE void gpuColor3ub(GLubyte r, GLubyte g, GLubyte b)
@@ -91,7 +91,7 @@
 	GPU_IMMEDIATE->color[0] = r;
 	GPU_IMMEDIATE->color[1] = g;
 	GPU_IMMEDIATE->color[2] = b;
-	GPU_IMMEDIATE->color[3] = 1;
+	GPU_IMMEDIATE->color[3] = 255;
 }
 
 BLI_INLINE void gpuColor3ubv(const GLubyte *restrict v)




More information about the Bf-blender-cvs mailing list