Commit 5f7268a1 authored by unknown's avatar unknown Committed by jean-pierre charras

3d-viewer, fix again a transparency issue.

parent dcdf9066
......@@ -587,6 +587,7 @@ void EDA_3D_CANVAS::Redraw()
if( isEnabled( FL_MODULE ) && m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] )
{
glEnable( GL_COLOR_MATERIAL );
SetOpenGlDefaultMaterial();
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glCallList( m_glLists[GL_ID_3DSHAPES_TRANSP_FRONT] );
......
......@@ -188,6 +188,7 @@ void S3D_MESH::openGL_Render( bool aIsRenderingJustNonTransparentObjects,
printf("m_MaterialIndexPerVertex.size() %lu\n", m_MaterialIndexPerVertex.size() );
printf("m_PerVertexNormalsNormalized.size() %lu\n", m_PerVertexNormalsNormalized.size() );
printf("m_PerFaceVertexNormals.size() %lu\n", m_PerFaceVertexNormals.size() );
printf("m_PerFaceNormalsNormalized.size() %lu\n", m_PerFaceNormalsNormalized.size() );
printf("smoothShapes %d\n", smoothShapes );
......@@ -208,8 +209,6 @@ void S3D_MESH::openGL_Render( bool aIsRenderingJustNonTransparentObjects,
float lastTransparency_value = 0.0f;
if( m_Materials )
{
if ( m_Materials->m_ColorPerVertex == false )
{
bool isTransparent = m_Materials->SetOpenGLMaterial( 0, useMaterial );
......@@ -229,7 +228,6 @@ void S3D_MESH::openGL_Render( bool aIsRenderingJustNonTransparentObjects,
return;
}
}
}
glPushMatrix();
glTranslatef( m_translation.x, m_translation.y, m_translation.z );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment