Skip to content
Snippets Groups Projects
Commit f02ab2a0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

offset_fill

parent 9a561880
No related branches found
No related tags found
No related merge requests found
/* $Id: Mesh.cpp,v 1.7 2000-11-28 08:35:03 geuzaine Exp $ */ /* $Id: Mesh.cpp,v 1.8 2000-12-01 13:56:10 geuzaine Exp $ */
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -68,6 +68,8 @@ void Draw_Mesh (Mesh *M) { ...@@ -68,6 +68,8 @@ void Draw_Mesh (Mesh *M) {
glPointSize(2); glPointSize(2);
glLineWidth(1); glLineWidth(1);
if(CTX.mesh.hidden) glEnable(GL_POLYGON_OFFSET_FILL);
switch(M->status) { switch(M->status) {
case 3 : case 3 :
if(CTX.mesh.draw && if(CTX.mesh.draw &&
...@@ -106,6 +108,8 @@ void Draw_Mesh (Mesh *M) { ...@@ -106,6 +108,8 @@ void Draw_Mesh (Mesh *M) {
break; break;
} }
if(CTX.mesh.hidden) glDisable(GL_POLYGON_OFFSET_FILL);
if(CTX.render_mode != GMSH_SELECT){ if(CTX.render_mode != GMSH_SELECT){
if(CTX.axes) if(CTX.axes)
Draw_Axes(CTX.lc_middle/4.); Draw_Axes(CTX.lc_middle/4.);
...@@ -275,7 +279,6 @@ void Draw_Simplex_Volume (void *a, void *b){ ...@@ -275,7 +279,6 @@ void Draw_Simplex_Volume (void *a, void *b){
ColorSwitch((*s)->iEnt); ColorSwitch((*s)->iEnt);
if (CTX.mesh.hidden) { if (CTX.mesh.hidden) {
glEnable(GL_POLYGON_OFFSET_FILL);
x1x0 = X[1]-X[0]; y1y0 = Y[1]-Y[0]; x1x0 = X[1]-X[0]; y1y0 = Y[1]-Y[0];
z1z0 = Z[1]-Z[0]; x2x0 = X[2]-X[0]; z1z0 = Z[1]-Z[0]; x2x0 = X[2]-X[0];
...@@ -333,7 +336,7 @@ void Draw_Simplex_Volume (void *a, void *b){ ...@@ -333,7 +336,7 @@ void Draw_Simplex_Volume (void *a, void *b){
glVertex3d(X[1], Y[1], Z[1]); glVertex3d(X[1], Y[1], Z[1]);
glVertex3d(X[2], Y[2], Z[2]); glVertex3d(X[2], Y[2], Z[2]);
glEnd(); glEnd();
glDisable(GL_POLYGON_OFFSET_FILL);
} }
#endif #endif
...@@ -446,11 +449,9 @@ void Draw_Simplex_Surfaces (void *a, void *b){ ...@@ -446,11 +449,9 @@ void Draw_Simplex_Surfaces (void *a, void *b){
if(CTX.mesh.surfaces){ if(CTX.mesh.surfaces){
if (CTX.mesh.hidden) { if (CTX.mesh.hidden) {
glEnable(GL_POLYGON_OFFSET_FILL);
glBegin(GL_POLYGON); glBegin(GL_POLYGON);
for(i=0 ; i<K*(1+L) ; i++) glVertex3d(pX[i], pY[i], pZ[i]); for(i=0 ; i<K*(1+L) ; i++) glVertex3d(pX[i], pY[i], pZ[i]);
glEnd(); glEnd();
glDisable(GL_POLYGON_OFFSET_FILL);
} }
if(CTX.mesh.lines){ if(CTX.mesh.lines){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment