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:
authorNathan Letwory <nathan@letworyinteractive.com>2008-01-16 22:49:34 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2008-01-16 22:49:34 +0300
commit7e14c5d119470c066fd76325dced68486117d91a (patch)
tree2ba53140e6cae2e3fcd05cd27ae0bb7dbc569157 /source/blender/editors/screen/glutil.c
parent3eca7d1d06c41d68e460dba31a0d1be774247e79 (diff)
* rearrange screen level drawing code a bit in preparation for tests.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r--source/blender/editors/screen/glutil.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index a601b301da6..81ef883c6c7 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -93,6 +93,42 @@ void sdrawline(short x1, short y1, short x2, short y2)
glEnd();
}
+/*
+
+ x1,y2
+ | \
+ | \
+ | \
+ x1,y1-- x2,y1
+
+*/
+
+void sdrawtripoints(short x1, short y1, short x2, short y2){
+ short v[2];
+ v[0]= x1; v[1]= y1;
+ glVertex2sv(v);
+ v[0]= x1; v[1]= y2;
+ glVertex2sv(v);
+ v[0]= x2; v[1]= y1;
+ glVertex2sv(v);
+ glEnd();
+}
+
+void sdrawtri(short x1, short y1, short x2, short y2)
+{
+ glBegin(GL_LINE_STRIP);
+ sdrawtripoints(x1, y1, x2, y2);
+ glEnd();
+}
+
+void sdrawtrifill(short x1, short y1, short x2, short y2, float r, float g, float b)
+{
+ glBegin(GL_TRIANGLES);
+ glColor3f(r, g, b);
+ sdrawtripoints(x1, y1, x2, y2);
+ glEnd();
+}
+
void sdrawbox(short x1, short y1, short x2, short y2)
{
short v[2];