[Bf-blender-cvs] [4aab21f] master: OpenGL: rename simple shader to basic shader.
Brecht Van Lommel
noreply at git.blender.org
Sun Dec 6 19:46:02 CET 2015
Commit: 4aab21f9be6ed0598279cfd0086181a99c28b50e
Author: Brecht Van Lommel
Date: Sat Dec 5 22:11:31 2015 +0100
Branches: master
https://developer.blender.org/rB4aab21f9be6ed0598279cfd0086181a99c28b50e
OpenGL: rename simple shader to basic shader.
===================================================================
M source/blender/blenfont/intern/blf.c
M source/blender/blenkernel/intern/pbvh.c
M source/blender/editors/interface/interface_draw.c
M source/blender/editors/interface/interface_icons.c
M source/blender/editors/screen/glutil.c
M source/blender/editors/sculpt_paint/paint_cursor.c
M source/blender/editors/space_clip/clip_draw.c
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/editors/space_view3d/drawarmature.c
M source/blender/editors/space_view3d/drawmesh.c
M source/blender/editors/space_view3d/drawobject.c
M source/blender/gpu/CMakeLists.txt
A source/blender/gpu/GPU_basic_shader.h
D source/blender/gpu/GPU_simple_shader.h
M source/blender/gpu/SConscript
A source/blender/gpu/intern/gpu_basic_shader.c
M source/blender/gpu/intern/gpu_buffers.c
M source/blender/gpu/intern/gpu_draw.c
M source/blender/gpu/intern/gpu_extensions.c
D source/blender/gpu/intern/gpu_simple_shader.c
A source/blender/gpu/shaders/gpu_shader_basic_frag.glsl
A source/blender/gpu/shaders/gpu_shader_basic_vert.glsl
D source/blender/gpu/shaders/gpu_shader_simple_frag.glsl
D source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 8b654d2..6c3fd09 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -55,7 +55,7 @@
#include "IMB_colormanagement.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "blf_internal_types.h"
#include "blf_internal.h"
@@ -498,7 +498,7 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
/* Save the current matrix mode. */
glGetIntegerv(GL_MATRIX_MODE, mode);
@@ -539,7 +539,7 @@ static void blf_draw_gl__end(GLint mode)
if (mode != GL_MODELVIEW)
glMatrixMode(mode);
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
glDisable(GL_BLEND);
}
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index d4c62fa..16ba25e 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -1693,7 +1693,7 @@ void BKE_pbvh_node_draw(PBVHNode *node, void *data_v)
col[i] = (rand() / (float)RAND_MAX) * 0.3 + 0.7;
}
- GPU_simple_shader_colors(col, spec, 0, 1.0f);
+ GPU_basic_shader_colors(col, spec, 0, 1.0f);
glColor3f(1, 0, 0);
#endif
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 244aef6..ae2e674 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -56,7 +56,7 @@
#include "BLF_api.h"
#include "GPU_draw.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "UI_interface.h"
@@ -1238,13 +1238,13 @@ void ui_draw_but_UNITVEC(uiBut *but, uiWidgetColors *wcol, const rcti *rect)
zero_v3(light.specular);
ui_but_v3_get(but, light.direction);
- GPU_simple_shader_light_set(0, &light);
+ GPU_basic_shader_light_set(0, &light);
for (int a = 1; a < 8; a++)
- GPU_simple_shader_light_set(a, NULL);
+ GPU_basic_shader_light_set(a, NULL);
/* setup shader */
- GPU_simple_shader_colors(diffuse, NULL, 0, 1.0f);
- GPU_simple_shader_bind(GPU_SHADER_LIGHTING);
+ GPU_basic_shader_colors(diffuse, NULL, 0, 1.0f);
+ GPU_basic_shader_bind(GPU_SHADER_LIGHTING);
/* transform to button */
glPushMatrix();
@@ -1276,7 +1276,7 @@ void ui_draw_but_UNITVEC(uiBut *but, uiWidgetColors *wcol, const rcti *rect)
glCallList(displist);
/* restore */
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
GPU_default_lights();
glDisable(GL_CULL_FACE);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index e012866..eb07a9d 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -34,7 +34,7 @@
#include "MEM_guardedalloc.h"
#include "GPU_extensions.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
@@ -1123,7 +1123,7 @@ static void icon_draw_texture(
y1 = iy * icongltex.invh;
y2 = (iy + ih) * icongltex.invh;
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glBindTexture(GL_TEXTURE_2D, icongltex.id);
/* sharper downscaling, has no effect when scale matches with a mip level */
@@ -1146,7 +1146,7 @@ static void icon_draw_texture(
glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f);
glBindTexture(GL_TEXTURE_2D, 0);
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
}
/* Drawing size for preview images */
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index a7f239e..4cbea2a 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -48,7 +48,7 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf_types.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "UI_interface.h"
@@ -590,7 +590,7 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, format, GL_UNSIGNED_BYTE, &uc_rect[(((size_t)subpart_y) * offset_y + subpart_h - 1) * img_w * components + (subpart_x * offset_x + subpart_w - 1) * components]);
}
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glBegin(GL_QUADS);
glTexCoord2f((float)(0 + offset_left) / tex_w, (float)(0 + offset_bot) / tex_h);
glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)offset_bot * yzoom);
@@ -604,7 +604,7 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
glTexCoord2f((float)(0 + offset_left) / tex_w, (float)(subpart_h - offset_top) / tex_h);
glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)(subpart_h - offset_top) * yzoom * scaleY);
glEnd();
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 079d088..76f6854 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -59,7 +59,7 @@
#include "ED_view3d.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "UI_resources.h"
@@ -336,7 +336,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
target->old_col = col;
}
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -459,7 +459,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
MEM_freeN(buffer);
}
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -795,7 +795,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
}
glPopAttrib();
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
}
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 2d73678..e00ebc1 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -58,7 +58,7 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "WM_types.h"
@@ -1087,7 +1087,7 @@ static void draw_plane_marker_image(Scene *scene,
glColor4f(1.0, 1.0, 1.0, plane_track->image_opacity);
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glGenTextures(1, (GLuint *)&texid);
glBindTexture(GL_TEXTURE_2D, texid);
@@ -1111,7 +1111,7 @@ static void draw_plane_marker_image(Scene *scene,
glPopMatrix();
glBindTexture(GL_TEXTURE_2D, 0);
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
if (transparent) {
glDisable(GL_BLEND);
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 925804b..deb0a3f 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -58,7 +58,7 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
@@ -1296,7 +1296,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glColor4f(1.0, 1.0, 1.0, 1.0);
- GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
glGenTextures(1, (GLuint *)&texid);
glBindTexture(GL_TEXTURE_2D, texid);
@@ -1371,7 +1371,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glEnd();
glBindTexture(GL_TEXTURE_2D, 0);
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF && sseq->flag & SEQ_USE_ALPHA)
glDisable(GL_BLEND);
glDeleteTextures(1, &texid);
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 37906eb..2ff3dcd 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -61,7 +61,7 @@
#include "ED_armature.h"
#include "ED_keyframes_draw.h"
-#include "GPU_simple_shader.h"
+#include "GPU_basic_shader.h"
#include "UI_resources.h"
@@ -885,7 +885,7 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co
if (dt == OB_SOLID) {
/* set up solid drawing */
- GPU_simple_shader_bind(GPU_SHADER_LIGHTING | GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_LIGHTING | GPU_SHADER_USE_COLOR);
gluQuadricDrawStyle(qobj, GLU_FILL);
glShadeModel(GL_SMOOTH);
@@ -967,7 +967,7 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co
/* restore */
if (dt == OB_SOLID) {
glShadeModel(GL_FLAT);
- GPU_simple_shader_bind(GPU_SHADER_USE_COLOR);
+ GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
}
glPopMatrix();
@@ -1165,7 +
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list