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:
authorMike Erwin <significant.bit@gmail.com>2015-11-25 19:49:46 +0300
committerMike Erwin <significant.bit@gmail.com>2015-11-25 19:51:12 +0300
commit816cdf262bdab28d3485adb6a37a937936d07a88 (patch)
tree127e326273a3e7e97d87594bd6273e1588023cbd /source/blender/editors
parentfeb574f21c5fcb883748bff843544f1f0c6a62a2 (diff)
OpenGL: GLSL always supported
In gpu lib: - GPU_glsl_support() always returns true - internal cleanup & comments Outside gpu lib: - remove check from various code, remove the “else” path - sprinkled a few C99-isms We can remove GPU_glsl_support() when BGE stops calling it.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c7
3 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 9fac4ca2265..93e9910a28b 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -1151,7 +1151,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d,
Mesh *me = ob->data;
TexMatCallback data = {scene, ob, me, dm};
bool (*set_face_cb)(void *, int);
- bool glsl, picking = (G.f & G_PICKSEL) != 0;
+ bool picking = (G.f & G_PICKSEL) != 0;
/* face hiding callback depending on mode */
if (ob == scene->obedit)
@@ -1162,7 +1162,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d,
set_face_cb = NULL;
/* test if we can use glsl */
- glsl = (v3d->drawtype == OB_MATERIAL) && GPU_glsl_support() && !picking;
+ bool glsl = (v3d->drawtype == OB_MATERIAL) && !picking;
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c697b22d57b..78e3ff1477b 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -289,8 +289,6 @@ static bool check_ob_drawface_dot(Scene *sce, View3D *vd, char dt)
bool draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, const char dt)
{
- if (!GPU_glsl_support())
- return false;
if (G.f & G_PICKSEL)
return false;
if (!check_object_draw_texture(scene, v3d, dt))
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 784c7bef7f7..f9101d15d04 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2969,17 +2969,16 @@ void ED_view3d_draw_offscreen_init(Scene *scene, View3D *v3d)
static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar)
{
if (scene->world && (v3d->flag3 & V3D_SHOW_WORLD)) {
- bool glsl = GPU_glsl_support() && BKE_scene_use_new_shading_nodes(scene) && scene->world->nodetree && scene->world->use_nodes;
+ bool glsl = BKE_scene_use_new_shading_nodes(scene) && scene->world->nodetree && scene->world->use_nodes;
if (glsl) {
RegionView3D *rv3d = ar->regiondata;
GPUMaterial *gpumat = GPU_material_world(scene, scene->world);
- bool material_not_bound;
/* calculate full shader for background */
GPU_material_bind(gpumat, 1, 1, 1.0, false, rv3d->viewmat, rv3d->viewinv, rv3d->viewcamtexcofac, (v3d->scenelock != 0));
- material_not_bound = !GPU_material_bound(gpumat);
+ bool material_not_bound = !GPU_material_bound(gpumat);
if (material_not_bound) {
glMatrixMode(GL_PROJECTION);
@@ -3023,7 +3022,7 @@ static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar)
#define VIEWGRAD_RES_Y 16
GLubyte grid_col[VIEWGRAD_RES_X][VIEWGRAD_RES_Y][4];
- static float grid_pos[VIEWGRAD_RES_X][VIEWGRAD_RES_Y][3];
+ static float grid_pos[VIEWGRAD_RES_X][VIEWGRAD_RES_Y][3];
static GLushort indices[VIEWGRAD_RES_X - 1][VIEWGRAD_RES_X - 1][4];
static bool buf_calculated = false;