diff options
author | Ton Roosendaal <ton@blender.org> | 2003-06-11 19:43:20 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-06-11 19:43:20 +0400 |
commit | 51c8bb6077e0b291aa01c1e4338e0c944a45853a (patch) | |
tree | 0b0757ffcf05615991f793befad372df45ee897f /source/blender/src/editface.c | |
parent | 47e7e146baa06ee63338503c75ff75c099c540a2 (diff) |
- OSX bugfix: drawing selection code for vpaint and faceselect happens in AUX
buffers now. It only works nice at OSX (tested, linux and windows do not
support it nicely)
This fixes the annoying flashing during paint or select
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r-- | source/blender/src/editface.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 2e2426f74b4..bf4d030d00b 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -445,8 +445,13 @@ TFace* face_pick(Mesh *me, short x, short y) backdrawview3d(0); } /* Read the pixel under the cursor */ +#ifdef __APPLE__ + glReadBuffer(GL_AUX0); +#endif glReadPixels(x+curarea->winrct.xmin, y+curarea->winrct.ymin, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); + glReadBuffer(GL_BACK); + /* Unbelievable! */ if (G.order==B_ENDIAN) { SWITCH_INT(col); @@ -532,9 +537,12 @@ void face_borderselect() val= get_border(&rect, 3); - /* why readbuffer here? shouldn't be necessary */ - glReadBuffer(GL_BACK); - + /* why readbuffer here? shouldn't be necessary (maybe a flush or so) */ + glReadBuffer(GL_BACK); +#ifdef __APPLE__ + glReadBuffer(GL_AUX0); /* apple only */ +#endif + if(val) { selar= MEM_callocN(me->totface+1, "selar"); @@ -571,6 +579,9 @@ void face_borderselect() allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } +#ifdef __APPLE__ + glReadBuffer(GL_BACK); +#endif } #define TEST_STRUBI 1 |