Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-09 22:28:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-09 22:28:30 +0400
commit89a963fb7fdff543b77de790355b9dac3019bd33 (patch)
tree4e1d2245e20f8c21625e99d771776f66c233a0de /source/blender/gpu/intern
parentde4bd55e01bc574c13977537ace1a0901dcfcaf0 (diff)
style cleanup: comment blocks
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c4
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h8
-rw-r--r--source/blender/gpu/intern/gpu_draw.c34
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c24
-rw-r--r--source/blender/gpu/intern/gpu_material.c11
5 files changed, 44 insertions, 37 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index f6db4f6e735..07d7568ab95 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -72,8 +72,8 @@ static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
* These are stored in a hash for lookup when creating a material. */
static GHash *FUNCTION_HASH= NULL;
-/*static char *FUNCTION_PROTOTYPES= NULL;
-static GPUShader *FUNCTION_LIB= NULL;*/
+/* static char *FUNCTION_PROTOTYPES= NULL;
+ * static GPUShader *FUNCTION_LIB= NULL;*/
static int gpu_str_prefix(const char *str, const char *prefix)
{
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index 85bf65232c1..db334b8bf19 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -61,10 +61,10 @@ typedef struct GPUFunction {
GPUFunction *GPU_lookup_function(const char *name);
/* Pass Generation
- - Takes a list of nodes and a desired output, and makes a pass. This
- will take ownership of the nodes and free them early if unused or
- at the end if used.
-*/
+ * - Takes a list of nodes and a desired output, and makes a pass. This
+ * will take ownership of the nodes and free them early if unused or
+ * at the end if used.
+ */
typedef enum GPUDataSource {
GPU_SOURCE_VEC_UNIFORM,
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 526f293d0b9..a5d6c374a42 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -193,9 +193,11 @@ static int is_pow2_limit(int num)
{
/* take texture clamping into account */
- /* XXX: texturepaint not global!
+ /* XXX: texturepaint not global! */
+#if 0
if (G.f & G_TEXTUREPAINT)
return 1;*/
+#endif
if (U.glreslimit != 0 && num > U.glreslimit)
return 0;
@@ -205,10 +207,12 @@ static int is_pow2_limit(int num)
static int smaller_pow2_limit(int num)
{
- /* XXX: texturepaint not global!
+ /* XXX: texturepaint not global! */
+#if 0
if (G.f & G_TEXTUREPAINT)
return 1;*/
-
+#endif
+
/* take texture clamping into account */
if (U.glreslimit != 0 && num > U.glreslimit)
return U.glreslimit;
@@ -467,7 +471,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
if(ibuf->rect_float) {
if(U.use_16bit_textures) {
/* use high precision textures. This is relatively harmless because OpenGL gives us
- a high precision format only if it is available */
+ * a high precision format only if it is available */
use_high_bit_depth = TRUE;
}
@@ -593,7 +597,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
}
/* scale if not a power of two. this is not strictly necessary for newer
- GPUs (OpenGL version >= 2.0) since they support non-power-of-two-textures */
+ * GPUs (OpenGL version >= 2.0) since they support non-power-of-two-textures */
if (!is_pow2_limit(rectw) || !is_pow2_limit(recth)) {
rectw= smaller_pow2_limit(rectw);
recth= smaller_pow2_limit(recth);
@@ -714,9 +718,9 @@ int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend)
}
/* these two functions are called on entering and exiting texture paint mode,
- temporary disabling/enabling mipmapping on all images for quick texture
- updates with glTexSubImage2D. images that didn't change don't have to be
- re-uploaded to OpenGL */
+ * temporary disabling/enabling mipmapping on all images for quick texture
+ * updates with glTexSubImage2D. images that didn't change don't have to be
+ * re-uploaded to OpenGL */
void GPU_paint_set_mipmap(int mipmap)
{
Image* ima;
@@ -1086,10 +1090,10 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
GMS.gviewinv= rv3d->viewinv;
/* alpha pass setup. there's various cases to handle here:
- * object transparency on: only solid materials draw in the first pass,
- and only transparent in the second 'alpha' pass.
- * object transparency off: for glsl we draw both in a single pass, and
- for solid we don't use transparency at all. */
+ * - object transparency on: only solid materials draw in the first pass,
+ * and only transparent in the second 'alpha' pass.
+ * - object transparency off: for glsl we draw both in a single pass, and
+ * for solid we don't use transparency at all. */
GMS.use_alpha_pass = (do_alpha_after != NULL);
GMS.is_alpha_pass = (v3d && v3d->transp);
if(GMS.use_alpha_pass)
@@ -1236,7 +1240,7 @@ int GPU_enable_material(int nr, void *attribs)
GMS.gboundmat= mat;
/* for glsl use alpha blend mode, unless it's set to solid and
- we are already drawing in an alpha pass */
+ * we are already drawing in an alpha pass */
if(mat->game.alpha_blend != GPU_BLEND_SOLID)
alphablend= mat->game.alpha_blend;
@@ -1525,8 +1529,8 @@ void GPU_state_init(void)
glDisable(GL_CULL_FACE);
/* calling this makes drawing very slow when AA is not set up in ghost
- on Linux/NVIDIA.
- glDisable(GL_MULTISAMPLE); */
+ * on Linux/NVIDIA. */
+ // glDisable(GL_MULTISAMPLE);
}
/* debugging aid */
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index ea47e67c1e6..e1d6f64f661 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -56,14 +56,14 @@
/* Extensions support */
/* extensions used:
- - texture border clamp: 1.3 core
- - fragement shader: 2.0 core
- - framebuffer object: ext specification
- - multitexture 1.3 core
- - arb non power of two: 2.0 core
- - pixel buffer objects? 2.1 core
- - arb draw buffers? 2.0 core
-*/
+ * - texture border clamp: 1.3 core
+ * - fragement shader: 2.0 core
+ * - framebuffer object: ext specification
+ * - multitexture 1.3 core
+ * - arb non power of two: 2.0 core
+ * - pixel buffer objects? 2.1 core
+ * - arb draw buffers? 2.0 core
+ */
static struct GPUGlobal {
GLint maxtextures;
@@ -850,7 +850,7 @@ struct GPUOffScreen {
GPUTexture *depth;
/* requested width/height, may be smaller than actual texture size due
- to missing non-power of two support, so we compensate for that */
+ * to missing non-power of two support, so we compensate for that */
int w, h;
};
@@ -1021,8 +1021,10 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, /*GPU
}
}
- /*if(lib && lib->lib)
- glAttachObjectARB(shader->object, lib->lib);*/
+#if 0
+ if(lib && lib->lib)
+ glAttachObjectARB(shader->object, lib->lib);
+#endif
glLinkProgramARB(shader->object);
glGetObjectParameterivARB(shader->object, GL_OBJECT_LINK_STATUS_ARB, &status);
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index c59af3cc7fb..89b3a7d5f3f 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -672,9 +672,10 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
i = is;
GPU_link(mat, "shade_visifac", i, visifac, shi->refl, &i);
-
- /*if(ma->mode & MA_TANGENT_VN)
- GPU_link(mat, "shade_tangent_v_spec", GPU_attribute(CD_TANGENT, ""), &vn);*/
+#if 0
+ if(ma->mode & MA_TANGENT_VN)
+ GPU_link(mat, "shade_tangent_v_spec", GPU_attribute(CD_TANGENT, ""), &vn);
+#endif
/* this replaces if(i > 0.0) conditional until that is supported */
// done in shade_visifac now, GPU_link(mat, "mtex_value_clamp_positive", i, &i);
@@ -1461,8 +1462,8 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma)
GPU_material_construct_end(mat);
/* note that even if building the shader fails in some way, we still keep
- it to avoid trying to compile again and again, and simple do not use
- the actual shader on drawing */
+ * it to avoid trying to compile again and again, and simple do not use
+ * the actual shader on drawing */
link = MEM_callocN(sizeof(LinkData), "GPUMaterialLink");
link->data = mat;