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-02-28 21:15:11 +0300
committerMike Erwin <significant.bit@gmail.com>2017-02-28 21:15:11 +0300
commit5e889ebf19ae1bd3daf6930473dc1d19029bf837 (patch)
tree361193b792f4409ae36ff0a487694b41277da354 /source/blender/editors/space_graph/graph_draw.c
parent54ed1b73240b99661e8e5a7335e08ebf8858baa4 (diff)
OpenGL: no more display lists
Part of the OpenGL core profile upgrade (T49165) Use the Batch drawing API (GPU_batch.h) when you want do draw something multiple times.
Diffstat (limited to 'source/blender/editors/space_graph/graph_draw.c')
-rw-r--r--source/blender/editors/space_graph/graph_draw.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index cdc7d62e267..99a38862354 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -388,31 +388,20 @@ static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
*/
static void draw_fcurve_sample_control(float x, float y, float xscale, float yscale, float hsize)
{
- static GLuint displist = 0;
-
- /* initialize X shape */
- if (displist == 0) {
- displist = glGenLists(1);
- glNewList(displist, GL_COMPILE);
-
- glBegin(GL_LINES);
- glVertex2f(-0.7f, -0.7f);
- glVertex2f(+0.7f, +0.7f);
-
- glVertex2f(-0.7f, +0.7f);
- glVertex2f(+0.7f, -0.7f);
- glEnd(); /* GL_LINES */
-
- glEndList();
- }
/* adjust view transform before starting */
glTranslatef(x, y, 0.0f);
glScalef(1.0f / xscale * hsize, 1.0f / yscale * hsize, 1.0f);
-
- /* draw! */
- glCallList(displist);
-
+
+ /* draw X shape */
+ glBegin(GL_LINES);
+ glVertex2f(-0.7f, -0.7f);
+ glVertex2f(+0.7f, +0.7f);
+
+ glVertex2f(-0.7f, +0.7f);
+ glVertex2f(+0.7f, -0.7f);
+ glEnd(); /* GL_LINES */
+
/* restore view transform */
glScalef(xscale / hsize, yscale / hsize, 1.0);
glTranslatef(-x, -y, 0.0f);