changeset 770:e6850c866469

fix windowing
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 May 2019 11:02:20 +0200
parents 4ba8892870a2
children ed783cbc92d7
files Framework/Scene2D/Internals/CairoFloatTextureRenderer.cpp Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/CairoFloatTextureRenderer.cpp	Thu May 23 20:37:19 2019 +0200
+++ b/Framework/Scene2D/Internals/CairoFloatTextureRenderer.cpp	Fri May 24 11:02:20 2019 +0200
@@ -39,7 +39,7 @@
       l.GetWindowing(windowCenter, windowWidth);
 
       const float a = windowCenter - windowWidth;
-      const float slope = 256.0f / (2.0f * windowWidth);
+      const float slope = 256.0f / windowWidth;
 
       const Orthanc::ImageAccessor& source = l.GetTexture();
       const unsigned int width = source.GetWidth();
--- a/Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp	Thu May 23 20:37:19 2019 +0200
+++ b/Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp	Fri May 24 11:02:20 2019 +0200
@@ -41,7 +41,7 @@
   "  float v = (t.r * 256.0 + t.g) * 256.0;      \n"
   "  v = v * u_slope + u_offset;                 \n"  // (*)
   "  float a = u_windowCenter - u_windowWidth;   \n"
-  "  float dy = 1.0 / (2.0 * u_windowWidth);     \n"
+  "  float dy = 1.0 / u_windowWidth;             \n"
   "  if (v <= a)                                 \n"
   "    v = 0.0;                                  \n"
   "  else                                        \n"