Commit: 27284e4f34d4ee0a79cbb2c4c587058b1bf7a03c
Author: Nicholas Bishop
Date:   Sat Jan 24 13:43:57 2015 +0100
Branches: master
https://developer.blender.org/rB27284e4f34d4ee0a79cbb2c4c587058b1bf7a03c

Code cleanup: minor comment improvements

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026

===================================================================

M       source/blender/gpu/GPU_material.h
M       source/blender/gpu/intern/gpu_codegen.c
M       source/blender/gpu/intern/gpu_codegen.h

===================================================================

diff --git a/source/blender/gpu/GPU_material.h 
b/source/blender/gpu/GPU_material.h
index cbbc428..a002c98 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -69,6 +69,7 @@ typedef struct GPULamp GPULamp;
 /* Functions to create GPU Materials nodes */
 
 typedef enum GPUType {
+       /* The value indicates the number of elements in each type */
        GPU_NONE = 0,
        GPU_FLOAT = 1,
        GPU_VEC2 = 2,
@@ -76,6 +77,7 @@ typedef enum GPUType {
        GPU_VEC4 = 4,
        GPU_MAT3 = 9,
        GPU_MAT4 = 16,
+
        GPU_TEX2D = 1002,
        GPU_SHADOW2D = 1003,
        GPU_ATTRIB = 3001
diff --git a/source/blender/gpu/intern/gpu_codegen.c 
b/source/blender/gpu/intern/gpu_codegen.c
index 984e1d6..0484423 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -64,6 +64,7 @@ static char *glsl_material_library = NULL;
 
 /* structs and defines */
 
+/* Indices match the GPUType enum */
 static const char *GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
        NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, 
"mat4"};
 
@@ -160,7 +161,7 @@ static void gpu_parse_functions_string(GHash *hash, char 
*code)
                                type= GPU_TEX2D;
 
                        if (type) {
-                               /* add paramater */
+                               /* add parameter */
                                code = gpu_str_skip_token(code, NULL, 0);
                                code = gpu_str_skip_token(code, NULL, 0);
                                function->paramqual[function->totparam]= qual;
diff --git a/source/blender/gpu/intern/gpu_codegen.h 
b/source/blender/gpu/intern/gpu_codegen.h
index cf9f4cc..abc5650 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -105,6 +105,8 @@ struct GPUNodeLink {
        int dynamictype;
 
        int type;
+
+       /* Refcount */
        int users;
 
        struct GPUTexture *dynamictex;
@@ -133,7 +135,7 @@ typedef struct GPUInput {
        int source;                             /* data source */
 
        int id;                                 /* unique id as created by code 
generator */
-       int texid;                              /* number for multitexture */
+       int texid;                              /* number for multitexture, 
starting from zero */
        int attribid;                   /* id for vertex attributes */
        int bindtex;                    /* input is responsible for binding the 
texture? */
        int definetex;                  /* input is responsible for defining 
the pixel? */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to