Skip to content
Snippets Groups Projects
Commit 0cf810aa authored by Maxime Graulich's avatar Maxime Graulich
Browse files

No commit message

No commit message
parent 6d2584cc
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ void drawGeomVertex(GVertex *v) ...@@ -33,7 +33,7 @@ void drawGeomVertex(GVertex *v)
(GLubyte)CTX::instance()->unpackBlue(col), (GLubyte)CTX::instance()->unpackBlue(col),
(GLubyte)CTX::instance()->unpackAlpha(col)); (GLubyte)CTX::instance()->unpackAlpha(col));
const GLfloat p[] = {(GLfloat)v->x(), (GLfloat)v->y(), (GLfloat)v->z()}; const GLfloat p[] = {(GLfloat)v->x(), (GLfloat)v->y(), (GLfloat)v->z()};
glPointSize((GLfloat)(CTX::instance()->geom.pointSize>0)? 3:1); glPointSize((GLfloat)CTX::instance()->geom.pointSize);
glVertexPointer(3, GL_FLOAT, 0, p); glVertexPointer(3, GL_FLOAT, 0, p);
glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_POINTS, 0, 1); glDrawArrays(GL_POINTS, 0, 1);
...@@ -66,9 +66,12 @@ void drawGeomEdge(GEdge *e) ...@@ -66,9 +66,12 @@ void drawGeomEdge(GEdge *e)
edge[i*3] = p.x(); edge[i*3+1] = p.y(); edge[i*3+2] = p.z(); edge[i*3] = p.x(); edge[i*3+1] = p.y(); edge[i*3+2] = p.z();
} }
// Then print the VA // Then print the VA
glLineWidth((GLfloat)CTX::instance()->geom.lineWidth);
glVertexPointer(3, GL_FLOAT, 0, edge); glVertexPointer(3, GL_FLOAT, 0, edge);
glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_VERTEX_ARRAY);
glEnable(GL_LINE_SMOOTH);
glDrawArrays(GL_LINE_STRIP, 0, N); glDrawArrays(GL_LINE_STRIP, 0, N);
glDisable(GL_LINE_SMOOTH);
glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_VERTEX_ARRAY);
free(edge); free(edge);
} }
...@@ -78,8 +81,6 @@ void drawGeomFace(GFace *f) ...@@ -78,8 +81,6 @@ void drawGeomFace(GFace *f)
} }
void drawContext::drawGeom() void drawContext::drawGeom()
{ {
if(!CTX::instance()->geom.draw) return;
for(unsigned int i=0; i<GModel::list.size(); i++) { for(unsigned int i=0; i<GModel::list.size(); i++) {
GModel *m = GModel::list[i]; GModel *m = GModel::list[i];
if(!m->getVisibility()) continue; if(!m->getVisibility()) continue;
......
...@@ -75,6 +75,7 @@ void drawMeshEdge(GEdge *e) ...@@ -75,6 +75,7 @@ void drawMeshEdge(GEdge *e)
else else
return; return;
} }
glLineWidth(CTX::instance()->mesh.lineWidth);
drawArray(e->va_lines, GL_LINES, true); drawArray(e->va_lines, GL_LINES, true);
} }
void drawMeshFace(GFace *f) void drawMeshFace(GFace *f)
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
} }
- (IBAction)singleTap:(UITapGestureRecognizer *)sender { - (IBAction)singleTap:(UITapGestureRecognizer *)sender {
[self.navigationController setToolbarHidden:!self.navigationController.toolbarHidden animated:YES]; [self.navigationController setToolbarHidden:(!(self.navigationController.toolbarHidden && !((AppDelegate *)[UIApplication sharedApplication].delegate)->compute && number_of_animation() > 0)) animated:YES];
} }
- (IBAction)doubleTap:(UITapGestureRecognizer *)sender { - (IBAction)doubleTap:(UITapGestureRecognizer *)sender {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment