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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-10-30 21:13:10 +0400
committerTon Roosendaal <ton@blender.org>2004-10-30 21:13:10 +0400
commit8aa1948c104b5a235908c3af7812dae6a668e311 (patch)
treeae8bd66bf365c7ccb59eca618ac927d12cc07b20 /source
parente1fb446ce741c462a763b26ffba5cf572fb5de06 (diff)
AFAIK... last issue with new Z-culling selection.
Since the new menu system draws in backbuffer, the selectionbuffer then needs a refresh after. Solved by nicely signalling stuff.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/drawview.c2
-rw-r--r--source/blender/src/editmesh_mods.c15
-rw-r--r--source/blender/src/editscreen.c4
-rw-r--r--source/blender/src/interface.c2
4 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 2599ac23c8d..38a59263bac 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -921,7 +921,7 @@ void backdrawview3d(int test)
}
}
persp(PERSP_VIEW);
-
+
#ifdef __APPLE__
glDrawBuffer(GL_AUX0);
#endif
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c
index 837aa625915..2bd8880ef18 100644
--- a/source/blender/src/editmesh_mods.c
+++ b/source/blender/src/editmesh_mods.c
@@ -87,8 +87,9 @@ editmesh_mods.c, UI level access, no geometry changes
#include "BDR_drawobject.h"
#include "BDR_editobject.h"
-#include "BSE_view.h"
+#include "BSE_drawview.h"
#include "BSE_edit.h"
+#include "BSE_view.h"
#include "IMB_imbuf.h"
@@ -103,16 +104,24 @@ editmesh_mods.c, UI level access, no geometry changes
int em_solidoffs=0, em_wireoffs=0, em_vertoffs; // set in drawobject.c ... for colorindices
+static void check_backbuf(void)
+{
+ if(G.vd->flag & V3D_NEEDBACKBUFDRAW) {
+ backdrawview3d(0);
+ }
+}
+
/* samples a single pixel (copied from vpaint) */
static unsigned int sample_backbuf(int x, int y)
{
unsigned int col;
if(x>=curarea->winx || y>=curarea->winy) return 0;
-
x+= curarea->winrct.xmin;
y+= curarea->winrct.ymin;
+ check_backbuf(); // actually not needed for apple
+
#ifdef __APPLE__
glReadBuffer(GL_AUX0);
#endif
@@ -141,6 +150,8 @@ static unsigned int *read_backbuf(short xmin, short ymin, short xmax, short ymax
if(yminc > ymaxc) return NULL;
buf= MEM_mallocN( (xmaxc-xminc+1)*(ymaxc-yminc+1)*sizeof(int), "sample rect");
+
+ check_backbuf(); // actually not needed for apple
#ifdef __APPLE__
glReadBuffer(GL_AUX0);
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index 8dfea4ff602..a7f2dc197de 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -598,6 +598,10 @@ void markdirty_all_back(void)
sa->head_swap &= ~WIN_BACK_OK;
}
}
+
+ /* if needed; backbuffer selection redraw */
+ if(G.vd) G.vd->flag |= V3D_NEEDBACKBUFDRAW;
+
}
void markdirty_win_back(short winid)
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 910398bb67b..ce2c6f8d512 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -331,8 +331,6 @@ static void ui_end_overdraw(uiOverDraw *od)
MEM_freeN(od);
markdirty_all_back(); // sets flags only
-
- /* todo; backbuffer selection redraw */
}
/* ****************** live updates for hilites and button presses *********** */