diff --git a/Graphics/Draw.h b/Graphics/Draw.h index 5e32ef85e82864a3268bf237aea1b1460a9e821f..69aad5ea858ed30a3efcb22b4e76c67556d78f3f 100644 --- a/Graphics/Draw.h +++ b/Graphics/Draw.h @@ -71,7 +71,7 @@ void Draw_Text2D3D(int dim, int timestep, int nb, List_T *td, List_T *tc); void Draw_Scales(void); void Draw_Axes (double s); void Draw_SmallAxes(void); -void Draw_Point(int size, int type, double *x, double *y, double *z, double Raise[3][5]); +void Draw_Point(int type, double size, double *x, double *y, double *z, double Raise[3][5]); void Draw_Line (double *x, double *y, double *z, double Raise[3][5]); void Draw_Triangle (double *x, double *y, double *z,double *n, double Raise[3][5], int shade); diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp index f979295178538364384c3880e7efb6ed0919d2ee..1b34a0532bd4d7f19417f2cc7ef0b652562f9236 100644 --- a/Graphics/Entity.cpp +++ b/Graphics/Entity.cpp @@ -1,4 +1,4 @@ -// $Id: Entity.cpp,v 1.16 2002-06-15 17:41:35 geuzaine Exp $ +// $Id: Entity.cpp,v 1.17 2002-06-15 21:29:59 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -28,7 +28,7 @@ extern Context_T CTX; -void Draw_Point (int size, int type, double *x, double *y, double *z, double Raise[3][5]){ +void Draw_Point (int type, double size, double *x, double *y, double *z, double Raise[3][5]){ static GLUquadricObj *qua; static int first=1; if(first){ @@ -229,10 +229,6 @@ void Draw_Vector (int Type, int Fill, } break ; - case DRAW_POST_ARROW_HEAD : - Msg(GERROR, "Arrow Head not done"); - break ; - case DRAW_POST_PYRAMID : b = .1333 * d; diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index 3b7ceb117105b2de8cc0950b65a68981af0027d0..3c02461747a2595f58e8af84ced6a7b991c2a142 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.35 2002-05-20 18:28:26 geuzaine Exp $ +// $Id: Post.cpp,v 1.36 2002-06-15 21:29:59 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -108,14 +108,6 @@ void RaiseFill(int i, double Val, double ValMin, double Raise[3][5]){ // Draw Post routines -void Free_DisplayLists(void){ - Post_View *v; - for(int iView=0 ; iView<List_Nbr(CTX.post.list) ; iView++){ - v = (Post_View*)List_Pointer(CTX.post.list,iView); - if(glIsList(v->Num)) glDeleteLists(v->Num,1); - } -} - void Get_Coords(double Explode, double *Offset, int nbnod, double *x1, double *y1, double *z1, double *x2, double *y2, double *z2){ @@ -192,17 +184,30 @@ void Draw_Post (void) { if(v->Visible && !v->Dirty){ - if(CTX.display_lists && !v->Changed && glIsList(v->Num)){ + if(CTX.display_lists && !v->Changed && v->DisplayListNum>0){ - glCallList(v->Num); + Msg(DEBUG, "Call display List %d", v->DisplayListNum); + glCallList(v->DisplayListNum); } else{ if(CTX.display_lists){ - if(glIsList(v->Num)) glDeleteLists(v->Num,1); - Msg(DEBUG, "New Display List"); - glNewList(v->Num, GL_COMPILE_AND_EXECUTE); + if(v->DisplayListNum>0){ + Msg(DEBUG, "Delete display List %d", v->DisplayListNum); + glDeleteLists(v->DisplayListNum,1); + } + else{ + v->DisplayListNum = glGenLists(1); + Msg(DEBUG, "Gen display list -> %d", v->DisplayListNum); + } + + if(v->DisplayListNum>0){ + Msg(DEBUG, "New display List %d", v->DisplayListNum); + glNewList(v->DisplayListNum, GL_COMPILE_AND_EXECUTE); + } + else + Msg(GERROR, "Unable to create display list"); } glPointSize(v->PointSize); diff --git a/Graphics/PostSimplex.cpp b/Graphics/PostSimplex.cpp index 6646bd4cf3ab59cbcdabfa448080e58d32eaa24b..5b4b782a1e75ab4d07a9c91c72f88115f09c91cd 100644 --- a/Graphics/PostSimplex.cpp +++ b/Graphics/PostSimplex.cpp @@ -1,4 +1,4 @@ -// $Id: PostSimplex.cpp,v 1.37 2002-06-15 17:41:35 geuzaine Exp $ +// $Id: PostSimplex.cpp,v 1.38 2002-06-15 21:29:59 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -38,7 +38,7 @@ void Draw_Simplex(Post_View *View, int nbnod, double *X, double *Y, double *Z, glColor4ubv((GLubyte*)&CTX.color.fg); switch(nbnod){ case 1 : - Draw_Point(View->PointSize,View->PointType,X,Y,Z,Raise); + Draw_Point(View->PointType,View->PointSize,X,Y,Z,Raise); break; case 2 : Draw_Line(X,Y,Z,Raise); @@ -99,7 +99,7 @@ void Draw_ScalarPoint(Post_View *View, Draw_String(Num); } else - Draw_Point(View->PointSize,View->PointType,X,Y,Z,Raise); + Draw_Point(View->PointType,View->PointSize,X,Y,Z,Raise); } } @@ -194,7 +194,7 @@ void Draw_ScalarLine(Post_View *View, thev, ValMin,ValMax,Xp,Yp,Zp,&nb); if(nb){ RaiseFill(0,thev,ValMin,Raise); - Draw_Point(View->PointSize,View->PointType,Xp,Yp,Zp,Raise); + Draw_Point(View->PointType,View->PointSize,Xp,Yp,Zp,Raise); } } }