[Bf-blender-cvs] [bf696c6] temp_viewport_fx_merge: more minor cleanup
Mike Erwin
noreply at git.blender.org
Wed Apr 1 20:25:27 CEST 2015
Commit: bf696c65fd197679ae6508866dd98d6def5e0bde
Author: Mike Erwin
Date: Wed Apr 1 14:21:09 2015 -0400
Branches: temp_viewport_fx_merge
https://developer.blender.org/rBbf696c65fd197679ae6508866dd98d6def5e0bde
more minor cleanup
===================================================================
M source/blender/gpu/GPU_immediate.h
M source/blender/gpu/intern/gpu_immediate.c
===================================================================
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index c1327ea..d45e0ec 100644
--- a/source/blender/gpu/GPU_immediate.h
+++ b/source/blender/gpu/GPU_immediate.h
@@ -656,10 +656,10 @@ BLI_INLINE void gpuMultAlpha(GLfloat factor)
BLI_INLINE void gpuGetColor4fv(GLfloat *color)
{
const float recip = 1.0f / 255.0f;
- color[0] = (GLfloat)(GPU_IMMEDIATE->color[0]) * recip;
- color[1] = (GLfloat)(GPU_IMMEDIATE->color[1]) * recip;
- color[2] = (GLfloat)(GPU_IMMEDIATE->color[2]) * recip;
- color[3] = (GLfloat)(GPU_IMMEDIATE->color[3]) * recip;
+ color[0] = GPU_IMMEDIATE->color[0] * recip;
+ color[1] = GPU_IMMEDIATE->color[1] * recip;
+ color[2] = GPU_IMMEDIATE->color[2] * recip;
+ color[3] = GPU_IMMEDIATE->color[3] * recip;
}
BLI_INLINE void gpuGetColor4ubv(GLubyte *color)
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c
index 6e3baf1..37e4cf3 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.c
@@ -2378,24 +2378,22 @@ INDEX_RELATIVE(uiv, GLuint, GL_UNSIGNED_INT)
-#define INDEX(suffix, ctype, glsymbol) \
-void gpuIndex##suffix(ctype nextIndex) \
-{ \
- GPUindex *index; \
- \
- BLI_assert(GPU_IMMEDIATE); \
- BLI_assert(GPU_IMMEDIATE->index); \
- BLI_assert(GPU_IMMEDIATE->index->type == glsymbol); \
- \
- { \
- if (GPU_IMMEDIATE->index->count < GPU_IMMEDIATE->index->maxIndexCount) \
- return; \
- } \
- \
- index = GPU_IMMEDIATE->index; \
- ((ctype*)(index->mappedBuffer))[index->count] = nextIndex; \
- index->count++; \
- index->offset += sizeof(ctype); \
+#define INDEX(suffix, ctype, glsymbol) \
+void gpuIndex##suffix(ctype nextIndex) \
+{ \
+ GPUindex *index; \
+ \
+ BLI_assert(GPU_IMMEDIATE); \
+ BLI_assert(GPU_IMMEDIATE->index); \
+ BLI_assert(GPU_IMMEDIATE->index->type == glsymbol); \
+ \
+ if (GPU_IMMEDIATE->index->count < GPU_IMMEDIATE->index->maxIndexCount) \
+ return; \
+ \
+ index = GPU_IMMEDIATE->index; \
+ ((ctype*)(index->mappedBuffer))[index->count] = nextIndex; \
+ index->count++; \
+ index->offset += sizeof(ctype); \
}
INDEX(ub, GLubyte, GL_UNSIGNED_BYTE)
More information about the Bf-blender-cvs
mailing list