diff --git a/QtMeshViewer/Resources/fshader.glsl b/QtMeshViewer/Resources/fshader.glsl index 12edc28..7e1dc1f 100644 --- a/QtMeshViewer/Resources/fshader.glsl +++ b/QtMeshViewer/Resources/fshader.glsl @@ -11,5 +11,7 @@ varying vec2 v_texcoord; void main() { // Set fragment color from texture - gl_FragColor = texture2D(texture, v_texcoord); + vec4 finalColor = vec4(texture2D(texture, v_texcoord)); + + gl_FragColor = finalColor; } diff --git a/QtMeshViewer/Source/OglViewerWidget.cpp b/QtMeshViewer/Source/OglViewerWidget.cpp index deadc89..67678a6 100644 --- a/QtMeshViewer/Source/OglViewerWidget.cpp +++ b/QtMeshViewer/Source/OglViewerWidget.cpp @@ -187,7 +187,11 @@ void OglViewerWidget::initializeGL() glEnable(GL_DEPTH_TEST); // Enable back face culling - glEnable(GL_CULL_FACE); + //glEnable(GL_CULL_FACE); + + // Enable transparency + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); m_dataEngine = new GeometryEngine(this); setConnections(); diff --git a/Release/Msh/2.tga b/Release/Msh/2.tga index 6943c43..c2cdc5d 100644 Binary files a/Release/Msh/2.tga and b/Release/Msh/2.tga differ