Bug 1258: selecting objects with text drawing (axis, or as draw extra)
causes crashes in IBM cards. Has been tested & verified. A crash on
selecting Empty is often reported... so I just disabled drawing of
text when in selecting-draw mode.
Added comments in code to note it clearly.
This commit is contained in:
Ton Roosendaal 2004-05-10 20:14:21 +00:00
parent c4dc33f18e
commit 208a2937f7

@ -302,13 +302,16 @@ void drawaxes(float size)
v2[axis]+= size*0.125; v2[axis]+= size*0.125;
glRasterPos3fv(v2); glRasterPos3fv(v2);
if (axis==0) // patch for 3d cards crashing on glSelect for text drawing (IBM)
BMF_DrawString(G.font, "x"); if((G.f & G_PICKSEL) == 0) {
else if (axis==1) if (axis==0)
BMF_DrawString(G.font, "y"); BMF_DrawString(G.font, "x");
else else if (axis==1)
BMF_DrawString(G.font, "z"); BMF_DrawString(G.font, "y");
else
BMF_DrawString(G.font, "z");
}
} }
} }
@ -3681,10 +3684,13 @@ void draw_object(Base *base)
if(dtx & OB_BOUNDBOX) draw_bounding_volume(ob); if(dtx & OB_BOUNDBOX) draw_bounding_volume(ob);
if(dtx & OB_TEXSPACE) drawtexspace(ob); if(dtx & OB_TEXSPACE) drawtexspace(ob);
if(dtx & OB_DRAWNAME) { if(dtx & OB_DRAWNAME) {
glRasterPos3f(0.0, 0.0, 0.0); // patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing
if((G.f & G_PICKSEL) == 0) {
BMF_DrawString(G.font, " "); glRasterPos3f(0.0, 0.0, 0.0);
BMF_DrawString(G.font, ob->id.name+2);
BMF_DrawString(G.font, " ");
BMF_DrawString(G.font, ob->id.name+2);
}
} }
if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp); if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);
if((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) draw_extra_wire(ob); if((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) draw_extra_wire(ob);