[Bf-blender-cvs] [3af88c6] temp_viewport_fx_merge: cleanup: code style
Mike Erwin
noreply at git.blender.org
Mon Mar 23 06:09:21 CET 2015
Commit: 3af88c69aaf883c35f8e653637249348c92cb994
Author: Mike Erwin
Date: Mon Mar 23 01:07:39 2015 -0400
Branches: temp_viewport_fx_merge
https://developer.blender.org/rB3af88c69aaf883c35f8e653637249348c92cb994
cleanup: code style
Mostly I wanted to go through the new GPU library code and learn it
thoroughly.
===================================================================
M source/blender/gpu/GPU_aspect.h
M source/blender/gpu/GPU_clipping.h
M source/blender/gpu/GPU_debug.h
M source/blender/gpu/GPU_font.h
M source/blender/gpu/GPU_immediate.h
M source/blender/gpu/GPU_lighting.h
M source/blender/gpu/GPU_matrix.h
M source/blender/gpu/GPU_pixels.h
M source/blender/gpu/GPU_primitives.h
M source/blender/gpu/GPU_raster.h
M source/blender/gpu/GPU_sprite.h
M source/blender/gpu/GPU_state_latch.h
M source/blender/gpu/intern/gpu_aspect.c
M source/blender/gpu/intern/gpu_basic.c
M source/blender/gpu/intern/gpu_blender_aspect.c
M source/blender/gpu/intern/gpu_clipping.c
M source/blender/gpu/intern/gpu_common.c
M source/blender/gpu/intern/gpu_debug.c
M source/blender/gpu/intern/gpu_extensions.c
M source/blender/gpu/intern/gpu_immediate.c
M source/blender/gpu/intern/gpu_init_exit.c
M source/blender/gpu/intern/gpu_lighting.c
M source/blender/gpu/intern/gpu_matrix.c
M source/blender/gpu/intern/gpu_pixels.c
M source/blender/gpu/intern/gpu_primitives.c
M source/blender/gpu/intern/gpu_primitives_inline.h
M source/blender/gpu/intern/gpu_private.h
M source/blender/gpu/intern/gpu_raster.c
M source/blender/gpu/intern/gpu_sprite.c
M source/blender/gpu/intern/gpu_state_latch.c
===================================================================
diff --git a/source/blender/gpu/GPU_aspect.h b/source/blender/gpu/GPU_aspect.h
index 36c6b06..b3ed093 100644
--- a/source/blender/gpu/GPU_aspect.h
+++ b/source/blender/gpu/GPU_aspect.h
@@ -29,7 +29,7 @@
*/
/** \file blender/gpu/GPU_aspect.h
- * \ingroup gpu
+ * \ingroup gpu
*/
#include "BLI_sys_types.h"
@@ -40,28 +40,28 @@
extern "C" {
#endif
-void GPU_gen_aspects (size_t count, uint32_t* aspects);
-void GPU_delete_aspects(size_t count, const uint32_t* aspects);
+void GPU_gen_aspects (size_t count, uint32_t *aspects);
+void GPU_delete_aspects(size_t count, const uint32_t *aspects);
typedef struct GPUaspectimpl {
- bool (*render_begin )(const void* object, void* param);
- bool (*render_end )(const void* object, void* param);
- bool (*render_commit)(const void* object);
- bool (*select_begin )(const void* object, void* param);
- bool (*select_end )(const void* object, void* param);
- bool (*select_commit)(const void* object);
- void (*enable )(const void* object, uint32_t options);
- void (*disable )(const void* object, uint32_t options);
- void* object;
- void* current_param; /* not a part of the interface */
+ bool (*render_begin )(const void *object, void *param);
+ bool (*render_end )(const void *object, void *param);
+ bool (*render_commit)(const void *object);
+ bool (*select_begin )(const void *object, void *param);
+ bool (*select_end )(const void *object, void *param);
+ bool (*select_commit)(const void *object);
+ void (*enable )(const void *object, uint32_t options);
+ void (*disable )(const void *object, uint32_t options);
+ void *object;
+ void *current_param; /* not a part of the interface */
} GPUaspectimpl;
-void GPU_aspect_impl(uint32_t aspect, GPUaspectimpl* aspectImpl);
+void GPU_aspect_impl(uint32_t aspect, GPUaspectimpl *aspectImpl);
-bool GPU_aspect_begin(uint32_t aspect, void* param);
-bool GPU_aspect_end (void);
+bool GPU_aspect_begin(uint32_t aspect, void *param);
+bool GPU_aspect_end(void);
-void GPU_aspect_enable (uint32_t aspect, uint32_t options);
+void GPU_aspect_enable(uint32_t aspect, uint32_t options);
void GPU_aspect_disable(uint32_t aspect, uint32_t options);
bool GPU_commit_aspect(void);
diff --git a/source/blender/gpu/GPU_clipping.h b/source/blender/gpu/GPU_clipping.h
index 519f3a9..7e833c7 100644
--- a/source/blender/gpu/GPU_clipping.h
+++ b/source/blender/gpu/GPU_clipping.h
@@ -29,7 +29,7 @@
*/
/** \file blender/gpu/GPU_clipping.h
- * \ingroup gpu
+ * \ingroup gpu
*/
#ifdef __cplusplus
@@ -46,8 +46,8 @@ void GPU_set_clip_planes(int clip_plane_count, const GPUplane clip_planes[]);
int GPU_get_clip_planes(GPUplane clip_planes_out[]);
/* Set clip planes without transforming them.
- Suitable for restoring a backup copy of previous clip plane state.
- Keeps clip planes from getting transformed twice. */
+ * Suitable for restoring a backup copy of previous clip plane state.
+ * Keeps clip planes from getting transformed twice. */
void GPU_restore_clip_planes(int clip_plane_count, const GPUplane clip_planes[]);
#ifdef __cplusplus
diff --git a/source/blender/gpu/GPU_debug.h b/source/blender/gpu/GPU_debug.h
index a74c0e7..322df05 100644
--- a/source/blender/gpu/GPU_debug.h
+++ b/source/blender/gpu/GPU_debug.h
@@ -53,21 +53,21 @@ void gpu_assert_no_gl_errors(const char *file, int line, const char *str);
# define GPU_ASSERT_NO_GL_ERRORS(str) gpu_assert_no_gl_errors(__FILE__, __LINE__, (str))
-# define GPU_CHECK_ERRORS_AROUND(glProcCall) \
- ( \
- GPU_ASSERT_NO_GL_ERRORS("Pre: " #glProcCall), \
- (glProcCall), \
+# define GPU_CHECK_ERRORS_AROUND(glProcCall) \
+ ( \
+ GPU_ASSERT_NO_GL_ERRORS("Pre: " #glProcCall), \
+ (glProcCall), \
GPU_ASSERT_NO_GL_ERRORS("Post: " #glProcCall) \
)
#ifdef WITH_GPU_DEBUG
/* inserts a debug marker message for the debug context messaging system */
-void gpu_string_marker (size_t size, const char *str);
+void gpu_string_marker(size_t size, const char *str);
# define GPU_STRING_MARKER(size, str) gpu_string_marker((size), (str))
-#else /* WITH_GPU_DEBUG */
-# define GPU_STRING_MARKER(len, str) ((void)(size),(void)(str))
+#else
+# define GPU_STRING_MARKER(len, str) ((void)(size),(void)(str))
#endif /* WITH_GPU_DEBUG */
#ifdef __cplusplus
diff --git a/source/blender/gpu/GPU_font.h b/source/blender/gpu/GPU_font.h
index 89fc5c3..e0095d5 100644
--- a/source/blender/gpu/GPU_font.h
+++ b/source/blender/gpu/GPU_font.h
@@ -53,4 +53,4 @@ void GPU_font_shader_unbind(void);
}
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index 3b4d60d..d3160af 100644
--- a/source/blender/gpu/GPU_immediate.h
+++ b/source/blender/gpu/GPU_immediate.h
@@ -81,7 +81,7 @@ void gpu_draw_range_elements_gl(void);
GPU_SAFE_RETURN(GPU_IMMEDIATE->lockCount == 0, var,);
/* Each block contains variables that can be inspected by a
- debugger in the event that an assert is triggered. */
+ * debugger in the event that an assert is triggered. */
#define GPU_CHECK_CAN_BEGIN() \
{ \
@@ -130,18 +130,18 @@ void gpuImmediateElementSizes(
void gpuImmediateMaxVertexCount(GLsizei maxVertexCount);
void gpuImmediateSamplerCount(size_t count);
-void gpuImmediateSamplerMap(const int * map);
+void gpuImmediateSamplerMap(const int *map);
void gpuImmediateTexCoordCount(size_t count);
-void gpuImmediateTexCoordSizes(const int * sizes);
+void gpuImmediateTexCoordSizes(const int *sizes);
void gpuImmediateFloatAttribCount(size_t count);
-void gpuImmediateFloatAttribSizes(const int * sizes);
-void gpuImmediateFloatAttribIndexMap(const unsigned int * map);
+void gpuImmediateFloatAttribSizes(const int *sizes);
+void gpuImmediateFloatAttribIndexMap(const unsigned int *map);
void gpuImmediateUbyteAttribCount(size_t count);
-void gpuImmediateUbyteAttribSizes(const int * sizes);
-void gpuImmediateUbyteAttribIndexMap(const unsigned int * map);
+void gpuImmediateUbyteAttribSizes(const int *sizes);
+void gpuImmediateUbyteAttribIndexMap(const unsigned int *map);
void gpuImmediateFormatReset(void);
void gpuImmediateLock(void);
@@ -156,7 +156,7 @@ typedef struct GPUarrays {
GLenum colorType;
GLint colorSize;
GLint colorStride;
- const void * colorPointer;
+ const void *colorPointer;
GLenum normalType;
GLint normalStride;
@@ -247,18 +247,18 @@ void gpuImmediateSingleRepeatRangeElements(GPUImmediate *immediate);
/* utility functions to setup vertex format and lock */
#ifdef GPU_SAFETY
-void gpuSafetyImmediateFormat_V2 (const char* file, int line);
-void gpuSafetyImmediateFormat_C4_V2 (const char* file, int line);
-void gpuSafetyImmediateFormat_T2_V2 (const char* file, int line);
-void gpuSafetyImmediateFormat_T2_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_T2_C4_V2 (const char* file, int line);
-void gpuSafetyImmediateFormat_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_N3_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_C4_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_C4_N3_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_T2_C4_N3_V3 (const char* file, int line);
-void gpuSafetyImmediateFormat_T3_C4_V3 (const char* file, int line);
-void gpuSafetyImmediateUnformat (const char* file, int line);
+void gpuSafetyImmediateFormat_V2 (const char *file, int line);
+void gpuSafetyImmediateFormat_C4_V2 (const char *file, int line);
+void gpuSafetyImmediateFormat_T2_V2 (const char *file, int line);
+void gpuSafetyImmediateFormat_T2_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_T2_C4_V2 (const char *file, int line);
+void gpuSafetyImmediateFormat_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_N3_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_C4_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_C4_N3_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_T2_C4_N3_V3 (const char *file, int line);
+void gpuSafetyImmediateFormat_T3_C4_V3 (const char *file, int line);
+void gpuSafetyImmediateUnformat (const char *file, int line);
#define gpuImmediateFormat_V2() gpuSafetyImmediateFormat_V2 (__FILE__, __LINE__)
#define gpuImmediateFormat_C4_V2() gpuSafetyImmediateFormat_C4_V2 (__FILE__, __LINE__)
@@ -323,7 +323,7 @@ typedef struct GPUindex {
GPUindex* gpuNewIndex(void);
void gpuDeleteIndex(GPUindex *index);
-void gpuImmediateIndex(GPUindex * index);
+void gpuImmediateIndex(GPUindex *index);
GPUindex* gpuGetImmediateIndex(void);
void gpuImmediateMaxIndexCount(GLsizei maxIndexCount, GLenum type);
void gpuImmediateIndexRange(GLuint indexMin, GLuint indexMax);
@@ -347,7 +347,7 @@ void gpuIndexEnd(void);
void gpuAppendClientArrays(
- const GPUarrays* arrays,
+ const GPUarrays *arrays,
GLint first,
GLsizei count);
@@ -497,15 +497,15 @@ void gpuSingleClientRangeElements_C4UB_V3F(
-void gpu_commit_current (void);
+void gpu_commit_current(void);
void gpu_commit_samplers(void);
#if defined(GLEW_ES_ONLY)
-/* ES 2.0 doesn't define QUADS, but the immediate mode replacement library emulates QUADS */
-/* (GL core has deprecated QUADS, but it should still be in the header) */
+/* ES 2.0 doesn't define QUADS, but the immediate mode replacement library emulates QUADS
+ * (GL core has deprecated QUADS, but it should still be in the header) */
#ifndef GL_QUADS
#define GL_QUADS 0x0007
@@ -598,8 +598,8 @@ BLI_INLINE void gpuColor4d(GLdouble r, GLdouble g, GLdouble b, GLdouble a)
/* This function converts a numerical value to the equivalent 24-bit
- color, while not being endian-sensitive. On little-endians, this
- is the same as doing a 'naive' indexing, on big-endian, it is not!
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list