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>2017-04-07 23:31:26 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-07 23:31:26 +0300
commitbd3a1b9490d96ca00748f405037379b743744877 (patch)
treeaed8ff42fb92cc78de6729cd6d90c3c5ee9ad8ca /source/blender/gpu/intern
parentc1dc078840541bd64f95fdeca52267c75a061e04 (diff)
OpenGL: use PRIM instead of GL enum for immBegin
Getting ready for a Gawain API change... Part of T49043
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c6
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index 1d9b58bfaa5..52829c6956b 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -213,7 +213,7 @@ void imm_draw_checker_box(float x1, float y1, float x2, float y2)
void imm_draw_cylinder_fill_normal_3d(
unsigned int pos, unsigned int nor, float base, float top, float height, int slices, int stacks)
{
- immBegin(GL_TRIANGLES, 6 * slices * stacks);
+ immBegin(PRIM_TRIANGLES, 6 * slices * stacks);
for (int i = 0; i < slices; ++i) {
const float angle1 = 2 * M_PI * ((float)i / (float)slices);
const float angle2 = 2 * M_PI * ((float)(i + 1) / (float)slices);
@@ -264,7 +264,7 @@ void imm_draw_cylinder_fill_normal_3d(
void imm_draw_cylinder_wire_3d(unsigned int pos, float base, float top, float height, int slices, int stacks)
{
- immBegin(GL_LINES, 6 * slices * stacks);
+ immBegin(PRIM_LINES, 6 * slices * stacks);
for (int i = 0; i < slices; ++i) {
const float angle1 = 2 * M_PI * ((float)i / (float)slices);
const float angle2 = 2 * M_PI * ((float)(i + 1) / (float)slices);
@@ -301,7 +301,7 @@ void imm_draw_cylinder_wire_3d(unsigned int pos, float base, float top, float he
void imm_draw_cylinder_fill_3d(unsigned int pos, float base, float top, float height, int slices, int stacks)
{
- immBegin(GL_TRIANGLES, 6 * slices * stacks);
+ immBegin(PRIM_TRIANGLES, 6 * slices * stacks);
for (int i = 0; i < slices; ++i) {
const float angle1 = 2 * M_PI * ((float)i / (float)slices);
const float angle2 = 2 * M_PI * ((float)(i + 1) / (float)slices);
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 3aea6f8bea4..ab29e91905b 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -259,7 +259,7 @@ static void draw_ofs_to_screen(GPUViewport *viewport)
immUniform1i("image", 0); /* default GL_TEXTURE0 unit */
- immBegin(GL_TRIANGLE_STRIP, 4);
+ immBegin(PRIM_TRIANGLE_STRIP, 4);
immAttrib2f(texcoord, 0.0f, 0.0f);
immVertex2f(pos, 0.0f, 0.0f);
@@ -392,7 +392,7 @@ void GPU_viewport_debug_depth_draw(GPUViewport *viewport, const float znear, con
immUniform1f("zfar", zfar);
immUniform1i("image", 0); /* default GL_TEXTURE0 unit */
- immBegin(GL_TRIANGLE_STRIP, 4);
+ immBegin(PRIM_TRIANGLE_STRIP, 4);
immAttrib2f(texcoord, 0.0f, 0.0f);
immVertex2f(pos, 0.0f, 0.0f);