diff --git a/NoiseTool/MeshNoisePreview.cpp b/NoiseTool/MeshNoisePreview.cpp index cadd6842..6a9ff933 100644 --- a/NoiseTool/MeshNoisePreview.cpp +++ b/NoiseTool/MeshNoisePreview.cpp @@ -475,7 +475,7 @@ MeshNoisePreview::VertexColorShader::VertexColorShader() size_t mainStartIdx = fragShader.find( mainStart ); CORRADE_INTERNAL_ASSERT_OUTPUT( mainStartIdx != std::string::npos ); - fragShader.insert( mainStartIdx + mainStart.length(), "if( !gl_FrontFacing ){ fragmentColor = vec4(0.0,0.0,0.0,1.0); return; }" ); + fragShader.insert( mainStartIdx + mainStart.length(), "if( !gl_FrontFacing ){ fragmentColor = (1.0 - interpolatedColor) * 0.05; return; }" ); GL::Shader vert = Shaders::Implementation::createCompatibilityShader( rs, version, GL::Shader::Type::Vertex ); GL::Shader frag = Shaders::Implementation::createCompatibilityShader( rs, version, GL::Shader::Type::Fragment ); diff --git a/NoiseTool/NoiseToolApp.cpp b/NoiseTool/NoiseToolApp.cpp index 88630254..01ab11c0 100644 --- a/NoiseTool/NoiseToolApp.cpp +++ b/NoiseTool/NoiseToolApp.cpp @@ -9,6 +9,13 @@ using namespace Magnum; +void InitResources() +{ +#ifdef MAGNUM_BUILD_STATIC + CORRADE_RESOURCE_INITIALIZE( NoiseTool_RESOURCES ) +#endif +} + NoiseToolApp::NoiseToolApp( const Arguments& arguments ) : Platform::Application{ arguments, Configuration{} @@ -20,6 +27,8 @@ NoiseToolApp::NoiseToolApp( const Arguments& arguments ) : }, mImGuiContext( Vector2{ windowSize() } / dpiScaling(), windowSize(), framebufferSize() ) { + InitResources(); + // Add a font that actually looks acceptable on HiDPI screens. { ImGui::GetIO().Fonts->Clear(); @@ -122,11 +131,11 @@ void NoiseToolApp::drawEvent() cameraVelocity *= mFrameTime.previousFrameDuration() * 80.0f; - if( !cameraVelocity.isZero() ) { + if( !cameraVelocity.isZero() ) + { Matrix4 transform = mCameraObject.transformation(); transform.translation() += transform.rotation() * cameraVelocity; mCameraObject.setTransformation( transform ); - redraw(); } if( mBackFaceCulling )