diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-09 23:15:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-09 23:15:15 +0400 |
commit | ad103954e64917673077d61cb6b495e78e7a6be9 (patch) | |
tree | 9f46996700edadcb37638576a6caba04a8b4c951 /source/blender/src/drawobject.c | |
parent | 64e584fc0a5b831bf78099b58f595188456e537b (diff) |
Apricot Branch: GLSL
====================
ATI fixes:
* Fix crash in glBitmap when rendering shadow buffers, it doesn't
seem to like using that function with only a depth buffer.
* Workaround either a bug in the driver or Blender, but I couldn't
find anything wrong, glVertexAttribPointerARB doesn't seem to
work inside display lists, so now it uses immediate mode to
create the list.
* Making deformable object for the game engine didn't check properly
if there was actually a vertex group, causing some static objects
to not use display lists.
* Also some cleanup in the game engine drawing code, replacing magic
numbers with an enum.
The apricot demo seems to runs slightly faster on a ATI HD3750 than
NVidia 8800 GTS.
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r-- | source/blender/src/drawobject.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 78b2fa470d4..61b1e32a876 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -419,6 +419,9 @@ void drawaxes(float size, int flag, char drawtype) float v1[3]= {0.0, 0.0, 0.0}; float v2[3]= {0.0, 0.0, 0.0}; float v3[3]= {0.0, 0.0, 0.0}; + + if(G.f & G_SIMULATION) + return; switch(drawtype) { @@ -801,6 +804,9 @@ static void drawlamp(Object *ob) float pixsize, lampsize; float imat[4][4], curcol[4]; char col[4]; + + if(G.f & G_SIMULATION) + return; la= ob->data; @@ -1091,6 +1097,9 @@ static void drawcamera(Object *ob, int flag) float vec[8][4], tmat[4][4], fac, facx, facy, depth; int i; + if(G.f & G_SIMULATION) + return; + cam= ob->data; glDisable(GL_LIGHTING); @@ -1894,6 +1903,9 @@ static void draw_verse_debug(Object *ob, EditMesh *em) struct EditFace *efa=NULL; float v1[3], v2[3], v3[3], v4[3], fvec[3], col[3]; char val[32]; + + if(G.f & G_SIMULATION) + return; if(G.vd->zbuf && (G.vd->flag & V3D_ZBUF_SELECT)==0) glDisable(GL_DEPTH_TEST); @@ -1958,6 +1970,9 @@ static void draw_em_measure_stats(Object *ob, EditMesh *em) char conv_float[5]; /* Use a float conversion matching the grid size */ float area, col[3]; /* area of the face, color of the text to draw */ + if(G.f & G_SIMULATION) + return; + /* make the precission of the pronted value proportionate to the gridsize */ if ((G.vd->grid) < 0.01) strcpy(conv_float, "%.6f"); @@ -2459,6 +2474,8 @@ static void draw_mesh_fancy(Base *base, int dt, int flag) dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, me->mface, 1); glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); + + set_gl_material(-1); } else if((G.f & (G_VERTEXPAINT+G_TEXTUREPAINT)) && me->mcol) { dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, NULL, 1); @@ -4735,9 +4752,8 @@ static void drawSolidSelect(Base *base) drawDispListwire(&ob->disp); } else if(ob->type==OB_ARMATURE) { - if(!(ob->flag & OB_POSEMODE)) { + if(!(ob->flag & OB_POSEMODE)) draw_armature(base, OB_WIRE, 0); - } } glLineWidth(1.0); @@ -5252,9 +5268,8 @@ void draw_object(Base *base, int flag) } /* draw extra: after normal draw because of makeDispList */ - if(dtx) { - if(G.f & G_SIMULATION); - else if(dtx & OB_AXIS) { + if(dtx && !(G.f & G_SIMULATION)) { + if(dtx & OB_AXIS) { drawaxes(1.0f, flag, OB_ARROWS); } if(dtx & OB_BOUNDBOX) draw_bounding_volume(ob); |