forked from bartvdbraak/blender
Fixed small annoyances with drawing selection circle and paint brush.
With glflush() change as committed before, updates weren't that good anymore. Solution is actually just flipping drawing order.
This commit is contained in:
parent
d2a424b814
commit
8c1b11286c
@ -342,7 +342,6 @@ void draw_sel_circle(short *mval, short *mvalo, float rad, float rado, int selec
|
||||
glDrawBuffer(GL_FRONT);
|
||||
|
||||
/* draw circle */
|
||||
|
||||
if(mvalo && no_mvalo==0) {
|
||||
fdrawXORcirc(mvalo[0], mvalo[1], rado);
|
||||
}
|
||||
@ -393,15 +392,16 @@ void circle_selectCB(select_CBfunc callback)
|
||||
if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1] || rado!=rad || firsttime) {
|
||||
firsttime= 0;
|
||||
|
||||
if(selecting) {
|
||||
callback(selecting, obj, mval, rad);
|
||||
}
|
||||
|
||||
draw_sel_circle(mval, mvalo, rad, rado, selecting);
|
||||
|
||||
mvalo[0]= mval[0];
|
||||
mvalo[1]= mval[1];
|
||||
rado= rad;
|
||||
|
||||
if(selecting) {
|
||||
callback(selecting, obj, mval, rad);
|
||||
}
|
||||
}
|
||||
event= extern_qread(&val);
|
||||
if (event) {
|
||||
|
@ -72,6 +72,7 @@
|
||||
#include "BIF_space.h"
|
||||
#include "BIF_screen.h"
|
||||
#include "BIF_toolbox.h"
|
||||
#include "BIF_glutil.h"
|
||||
#include "BIF_gl.h"
|
||||
|
||||
#include "BDR_vpaint.h"
|
||||
@ -828,9 +829,6 @@ void weight_paint(void)
|
||||
|
||||
if(firsttime || mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
|
||||
|
||||
if(firsttime) draw_sel_circle(mval, 0, Gvp.size, Gvp.size, 0);
|
||||
else draw_sel_circle(mval, mvalo, Gvp.size, Gvp.size, 0);
|
||||
|
||||
firsttime= 0;
|
||||
|
||||
/* which faces are involved */
|
||||
@ -912,11 +910,16 @@ void weight_paint(void)
|
||||
else BIF_wait_for_statechange();
|
||||
|
||||
if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
|
||||
// makeDispList(ob);
|
||||
|
||||
scrarea_do_windraw(curarea);
|
||||
|
||||
/* draw circle in backbuf! */
|
||||
persp(PERSP_WIN);
|
||||
fdrawXORcirc((float)mval[0], (float)mval[1], Gvp.size);
|
||||
persp(PERSP_VIEW);
|
||||
|
||||
screen_swapbuffers();
|
||||
backdrawview3d(0);
|
||||
draw_sel_circle(mval, 0, Gvp.size, Gvp.size, 0);
|
||||
|
||||
mvalo[0]= mval[0];
|
||||
mvalo[1]= mval[1];
|
||||
@ -928,9 +931,6 @@ void weight_paint(void)
|
||||
me->mcol= 0;
|
||||
}
|
||||
|
||||
/* clear circle */
|
||||
draw_sel_circle(0, mvalo, 0, Gvp.size, 1);
|
||||
|
||||
makeDispList(ob);
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
@ -992,9 +992,6 @@ void vertex_paint()
|
||||
|
||||
if(firsttime || mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
|
||||
|
||||
if(firsttime) draw_sel_circle(mval, 0, Gvp.size, Gvp.size, 0);
|
||||
else draw_sel_circle(mval, mvalo, Gvp.size, Gvp.size, 0);
|
||||
|
||||
firsttime= 0;
|
||||
|
||||
/* which faces are involved */
|
||||
@ -1081,23 +1078,25 @@ void vertex_paint()
|
||||
|
||||
MTC_Mat4SwapMat4(G.vd->persmat, mat);
|
||||
|
||||
}
|
||||
else BIF_wait_for_statechange();
|
||||
|
||||
if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
|
||||
do_shared_vertexcol(me);
|
||||
if(me->tface) {
|
||||
mcol_to_tface(me, 0);
|
||||
}
|
||||
|
||||
scrarea_do_windraw(curarea);
|
||||
|
||||
/* draw circle in backbuf! */
|
||||
persp(PERSP_WIN);
|
||||
fdrawXORcirc((float)mval[0], (float)mval[1], Gvp.size);
|
||||
persp(PERSP_VIEW);
|
||||
|
||||
screen_swapbuffers();
|
||||
draw_sel_circle(mval, 0, Gvp.size, Gvp.size, 0);
|
||||
backdrawview3d(0);
|
||||
|
||||
|
||||
mvalo[0]= mval[0];
|
||||
mvalo[1]= mval[1];
|
||||
}
|
||||
else BIF_wait_for_statechange();
|
||||
}
|
||||
|
||||
if(me->tface) {
|
||||
@ -1105,9 +1104,6 @@ void vertex_paint()
|
||||
me->mcol= 0;
|
||||
}
|
||||
|
||||
/* clear circle */
|
||||
draw_sel_circle(0, mvalo, 0, Gvp.size, 1);
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user