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-24 10:20:38 +0300
committerMike Erwin <significant.bit@gmail.com>2015-11-24 10:21:07 +0300
commit291afea8ccdea57d4b2a51f134e9f53deeff964e (patch)
tree9e3b6368fa383b1aef835aa8bdeb7f55671579e1 /source/blender/gpu/intern/gpu_draw.c
parent4ebede5d1f4db09091df69aa6e19b08b4b0fa535 (diff)
OpenGL: clean up use of old extensions
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 3ad396a532c..f71733064c4 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -182,17 +182,17 @@ void GPU_render_text(
uv[2][1] = (uv_quad[2][1] - centery) * sizey + transy;
glBegin(GL_POLYGON);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[0]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[0]);
else glTexCoord2fv(uv[0]);
if (col) gpu_mcol(col[0]);
glVertex3f(sizex * v1[0] + movex, sizey * v1[1] + movey, v1[2]);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[1]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[1]);
else glTexCoord2fv(uv[1]);
if (col) gpu_mcol(col[1]);
glVertex3f(sizex * v2[0] + movex, sizey * v2[1] + movey, v2[2]);
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[2]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[2]);
else glTexCoord2fv(uv[2]);
if (col) gpu_mcol(col[2]);
glVertex3f(sizex * v3[0] + movex, sizey * v3[1] + movey, v3[2]);
@@ -201,7 +201,7 @@ void GPU_render_text(
uv[3][0] = (uv_quad[3][0] - centerx) * sizex + transx;
uv[3][1] = (uv_quad[3][1] - centery) * sizey + transy;
- if (glattrib >= 0) glVertexAttrib2fvARB(glattrib, uv[3]);
+ if (glattrib >= 0) glVertexAttrib2fv(glattrib, uv[3]);
else glTexCoord2fv(uv[3]);
if (col) gpu_mcol(col[3]);
glVertex3f(sizex * v4[0] + movex, sizey * v4[1] + movey, v4[2]);
@@ -2039,33 +2039,31 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[4][
static void gpu_multisample(bool enable)
{
- if (GLEW_VERSION_1_3 || GLEW_ARB_multisample) {
#ifdef __linux__
- /* changing multisample from the default (enabled) causes problems on some
- * systems (NVIDIA/Linux) when the pixel format doesn't have a multisample buffer */
- bool toggle_ok = true;
+ /* changing multisample from the default (enabled) causes problems on some
+ * systems (NVIDIA/Linux) when the pixel format doesn't have a multisample buffer */
+ bool toggle_ok = true;
- if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_UNIX, GPU_DRIVER_ANY)) {
- int samples = 0;
- glGetIntegerv(GL_SAMPLES, &samples);
+ if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_UNIX, GPU_DRIVER_ANY)) {
+ int samples = 0;
+ glGetIntegerv(GL_SAMPLES, &samples);
- if (samples == 0)
- toggle_ok = false;
- }
+ if (samples == 0)
+ toggle_ok = false;
+ }
- if (toggle_ok) {
- if (enable)
- glEnable(GL_MULTISAMPLE);
- else
- glDisable(GL_MULTISAMPLE);
- }
-#else
+ if (toggle_ok) {
if (enable)
glEnable(GL_MULTISAMPLE);
else
glDisable(GL_MULTISAMPLE);
-#endif
}
+#else
+ if (enable)
+ glEnable(GL_MULTISAMPLE);
+ else
+ glDisable(GL_MULTISAMPLE);
+#endif
}
/* Default OpenGL State */