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:
authorEd Halley <ed@halley.cc>2007-03-06 06:39:15 +0300
committerEd Halley <ed@halley.cc>2007-03-06 06:39:15 +0300
commit3927ee214c5f758fa66ac950ed82a3012bdc64d3 (patch)
tree3ef0644b005dc5a2e965234aa36dcb4f124f6fdb /source/blender/src
parent8d95e59feae698c0f6cf23654647561ec5997bcb (diff)
Uses the bglFlush() and is_a_really_crappy_intel_card() hacks to give
better support on low-end Macintoshes with integrated Intel graphics chipsets. Patch received from "UncleZiev" on #blendercoders, but I adjusted it so other video chipsets and platforms are unaffected. The only visual difference is that on MacBook and iMac machines, the box select outline is drawn with solid, not dashed lines like other platforms and not invisible as they were previously.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/edit.c12
-rw-r--r--source/blender/src/editview.c10
-rw-r--r--source/blender/src/glutil.c2
3 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c
index 03bb19aed0a..08f72946187 100644
--- a/source/blender/src/edit.c
+++ b/source/blender/src/edit.c
@@ -168,7 +168,7 @@ int get_border(rcti *rect, short flag)
/* draws the selection initial cross */
sdrawXORline4(0, 0, mvalo[1], curarea->winx, mvalo[1]);
sdrawXORline4(1, mvalo[0], 0, mvalo[0], curarea->winy);
- glFlush();
+ bglFlush();
while(TRUE) {
@@ -180,7 +180,7 @@ int get_border(rcti *rect, short flag)
/* aiming cross */
sdrawXORline4(0, 0, mval[1], curarea->winx, mval[1]);
sdrawXORline4(1, mval[0], 0, mval[0], curarea->winy);
- glFlush();
+ bglFlush();
mvalo[0]= mval[0];
mvalo[1]= mval[1];
@@ -227,7 +227,7 @@ int get_border(rcti *rect, short flag)
sdrawXORline4(1, x1, mvalo[1], mvalo[0], mvalo[1]);
sdrawXORline4(2, mvalo[0], mvalo[1], mvalo[0], y1);
sdrawXORline4(3, mvalo[0], y1, x1, y1);
- glFlush();
+ bglFlush();
while(TRUE) {
getmouseco_areawin(mval);
@@ -294,7 +294,7 @@ int get_border(rcti *rect, short flag)
BMF_DrawString(G.fonts, str);
}
- glFlush();
+ bglFlush();
mvalo[0]= mval[0];
mvalo[1]= mval[1];
@@ -344,7 +344,7 @@ int get_border(rcti *rect, short flag)
}
}
- glFlush();
+ bglFlush();
glReadBuffer(GL_BACK);
glDrawBuffer(GL_BACK);
@@ -399,7 +399,7 @@ void draw_sel_circle(short *mval, short *mvalo, float rad, float rado, int selec
}
//setlinestyle(0);
- glFlush();
+ bglFlush();
persp(PERSP_VIEW);
glDrawBuffer(GL_BACK);
glReadBuffer(GL_BACK);
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index 6a79d9b4ddd..c38ba9e8f8c 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -1656,10 +1656,14 @@ void borderselect(void)
face_borderselect();
return;
}
-
- setlinestyle(2);
+
+ a = 0;
+#ifdef __APPLE__
+ a = is_a_really_crappy_intel_card();
+#endif
+ if (!a) setlinestyle(2);
val= get_border(&rect, 3);
- setlinestyle(0);
+ if (!a) setlinestyle(0);
if(val==0)
return;
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c
index eef5e41dee2..eddfa32739f 100644
--- a/source/blender/src/glutil.c
+++ b/source/blender/src/glutil.c
@@ -661,7 +661,7 @@ void bglPolygonOffset(float dist)
}
}
-static int is_a_really_crappy_intel_card(void)
+int is_a_really_crappy_intel_card(void)
{
static int well_is_it= -1;