diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2015-01-27 22:18:39 +0300 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2015-01-27 22:18:59 +0300 |
commit | 86d2765ebe05716861240d7438e5051ae6939603 (patch) | |
tree | e0a62225dc223506f7e1155b7fbb026cf590bffe /source/blender/editors/interface/interface_draw.c | |
parent | 1bfeabf4c5700c5f684ba9701b30d5c7d4f05a4f (diff) |
Interface get rid of some quadstrips in favor of trianglestrips
If we ever want OpenGL 3.2 core context quadstrips need to go anyway and while there is much more things that need to be done this is something that can be tackled without any mayor surgery.
And without losing any kind of compatibility with ancient GL.
Reviewers: psy-fi
Reviewed By: psy-fi
Subscribers: psy-fi
Projects: #bf_blender
Differential Revision: https://developer.blender.org/D1027
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index cca4df30811..5c5bd2c7584 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -539,7 +539,7 @@ static void histogram_draw_one(float r, float g, float b, float alpha, glColor4f(r, g, b, alpha); glShadeModel(GL_FLAT); - glBegin(GL_QUAD_STRIP); + glBegin(GL_TRIANGLE_STRIP); glVertex2f(x, y); glVertex2f(x, y + (data[0] * h)); for (i = 1; i < res; i++) { @@ -1147,7 +1147,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti v1[1] = y1 + sizey_solid; v2[1] = rect->ymax; - glBegin(GL_QUAD_STRIP); + glBegin(GL_TRIANGLE_STRIP); for (a = 0; a <= sizex; a++) { pos = ((float)a) / sizex; do_colorband(coba, pos, colf); @@ -1166,7 +1166,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti v1[1] = y1; v2[1] = y1 + sizey_solid; - glBegin(GL_QUAD_STRIP); + glBegin(GL_TRIANGLE_STRIP); for (a = 0; a <= sizex; a++) { pos = ((float)a) / sizex; do_colorband(coba, pos, colf); |