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:
authorTon Roosendaal <ton@blender.org>2004-06-24 19:12:45 +0400
committerTon Roosendaal <ton@blender.org>2004-06-24 19:12:45 +0400
commit855c6861ef881133b5614c339cd4e52d1aee4510 (patch)
tree8d703538d5cd52da2cb9064db75bc0b145636339 /source/blender/src/editscreen.c
parentd5b4fb5736ddc0d8ad75526b8d026c5c55221ed6 (diff)
The other fix for drawing XOR lines, now for dragging window edges too.
Main 'improvement' is it not using the gl_util function, but drawing it all itself, and thus minimizing the amount of flush calls (factor 4).
Diffstat (limited to 'source/blender/src/editscreen.c')
-rw-r--r--source/blender/src/editscreen.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index d2fec2a034c..fa9d8f88d07 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -2611,11 +2611,11 @@ void test_scale_screen(bScreen *sc)
static void draw_front_xor_dirdist_line(char dir, int dist, int start, int end)
{
if (dir=='h') {
- glutil_draw_front_xor_line(start, dist, end, dist);
- glutil_draw_front_xor_line(start, dist+1, end, dist+1);
+ sdrawXORline(start, dist, end, dist);
+ sdrawXORline(start, dist+1, end, dist+1);
} else {
- glutil_draw_front_xor_line(dist, start, dist, end);
- glutil_draw_front_xor_line(dist+1, start, dist+1, end);
+ sdrawXORline(dist, start, dist, end);
+ sdrawXORline(dist+1, start, dist+1, end);
}
}
@@ -2697,6 +2697,9 @@ static void moveareas(ScrEdge *edge)
mywinset(G.curscreen->mainwin);
+ glReadBuffer(GL_FRONT);
+ glDrawBuffer(GL_FRONT);
+
doit= delta= 0;
getmouseco_sc(mvalo);
draw_front_xor_dirdist_line(dir, edge_position+delta, edge_start, edge_end);
@@ -2716,7 +2719,7 @@ static void moveareas(ScrEdge *edge)
delta= CLAMPIS(delta, -smaller, bigger);
draw_front_xor_dirdist_line(dir, edge_position+delta, edge_start, edge_end);
-
+ glFlush();
}
else if (event==LEFTMOUSE) {
doit= 1;
@@ -2729,6 +2732,9 @@ static void moveareas(ScrEdge *edge)
}
}
draw_front_xor_dirdist_line(dir, edge_position+delta, edge_start, edge_end);
+ glFlush();
+ glReadBuffer(GL_BACK);
+ glDrawBuffer(GL_BACK);
if (doit==1) {
for (v1= G.curscreen->vertbase.first; v1; v1= v1->next) {
@@ -2757,7 +2763,6 @@ static void moveareas(ScrEdge *edge)
testareas();
}
- glDrawBuffer(GL_BACK);
mainqenter(DRAWEDGES, 1);
dodrawscreen= 1; /* patch! event gets lost,,,? */
}