+ implement global draw styles
+ use double precision in XML file + fix crash with in SoBrepFaceSet git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5083 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
@@ -166,7 +166,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
Gui::MenuItem* view = new Gui::MenuItem( menuBar );
|
||||
view->setCommand("&View");
|
||||
*view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Separator"
|
||||
<< stdviews << "Std_FreezeViews" << "Separator" << view3d << zoom
|
||||
<< stdviews << "Std_FreezeViews" << "Separator" << view3d << "Std_DrawStyle" << zoom
|
||||
<< "Std_ViewDockUndockFullscreen" << "Std_AxisCross" << "Std_ToggleClipPlane"
|
||||
<< "Std_TextureMapping" << "Separator" << visu
|
||||
<< "Std_ToggleVisibility" << "Std_ToggleNavigation"
|
||||
|
||||
@@ -424,13 +424,15 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
materials->send(*matindices++, TRUE);
|
||||
}
|
||||
|
||||
if (nbind == PER_VERTEX || nbind == PER_FACE) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED || nbind == PER_FACE_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
if (normals) {
|
||||
if (nbind == PER_VERTEX || nbind == PER_FACE) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED || nbind == PER_FACE_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
}
|
||||
|
||||
if (texture) {
|
||||
@@ -447,13 +449,15 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
else if (mbind == PER_VERTEX_INDEXED)
|
||||
materials->send(*matindices++, TRUE);
|
||||
|
||||
if (nbind == PER_VERTEX) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
if (normals) {
|
||||
if (nbind == PER_VERTEX) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
}
|
||||
|
||||
if (texture) {
|
||||
@@ -470,13 +474,15 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
else if (mbind == PER_VERTEX_INDEXED)
|
||||
materials->send(*matindices++, TRUE);
|
||||
|
||||
if (nbind == PER_VERTEX) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
if (normals) {
|
||||
if (nbind == PER_VERTEX) {
|
||||
currnormal = normals++;
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
else if (nbind == PER_VERTEX_INDEXED) {
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
}
|
||||
}
|
||||
|
||||
if (texture) {
|
||||
|
||||
Reference in New Issue
Block a user