Mercurial > hg > orthanc-stone
changeset 696:75deb0acd632
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 17 May 2019 18:04:26 +0200 |
parents | 7bf91c4ebd65 (current diff) 7c6197d9acc9 (diff) |
children | 14557e550920 c0a5eb9a4290 d4d6c5b502b5 |
files | |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/OpenGLLinesProgram.cpp Fri May 17 18:04:14 2019 +0200 +++ b/Framework/Scene2D/Internals/OpenGLLinesProgram.cpp Fri May 17 18:04:26 2019 +0200 @@ -420,12 +420,12 @@ glUniform1f(program_->GetUniformLocation("u_thickness"), static_cast<GLfloat>(t1 / zoom)); - glUniform1f(program_->GetUniformLocation("u_antialiasing_start"), + glUniform1f(program_->GetUniformLocation("u_antialiasing_start"), static_cast<GLfloat>(t0 / t1)); } else { - glUniform1f(program_->GetUniformLocation("u_thickness"), + glUniform1f(program_->GetUniformLocation("u_thickness"), static_cast<GLfloat>(thickness / zoom)); } } @@ -436,14 +436,14 @@ double t1 = std::max(thickness, aliasingBorder / zoom); double t0 = std::max(0.0, thickness - aliasingBorder / zoom); - glUniform1f(program_->GetUniformLocation("u_thickness"), + glUniform1f(program_->GetUniformLocation("u_thickness"), static_cast<GLfloat>(t1)); - glUniform1f(program_->GetUniformLocation("u_antialiasing_start"), + glUniform1f(program_->GetUniformLocation("u_antialiasing_start"), static_cast<GLfloat>(t0 / t1)); } else { - glUniform1f(program_->GetUniformLocation("u_thickness"), + glUniform1f(program_->GetUniformLocation("u_thickness"), static_cast<GLfloat>(thickness)); } } @@ -452,12 +452,14 @@ { glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - glDrawArrays(GL_TRIANGLES, 0, data.GetVerticesCount()); + glDrawArrays(GL_TRIANGLES, 0, + static_cast<GLsizei>(data.GetVerticesCount())); glDisable(GL_BLEND); } else { - glDrawArrays(GL_TRIANGLES, 0, data.GetVerticesCount()); + glDrawArrays(GL_TRIANGLES, 0, + static_cast<GLsizei>(data.GetVerticesCount())); } glDisableVertexAttribArray(locationPosition);
--- a/Framework/Scene2D/ZoomSceneTracker.h Fri May 17 18:04:14 2019 +0200 +++ b/Framework/Scene2D/ZoomSceneTracker.h Fri May 17 18:04:26 2019 +0200 @@ -21,11 +21,14 @@ #pragma once + #include "IPointerTracker.h" #include "Internals/FixedPointAligner.h" namespace OrthancStone { + class Scene2D; + class ZoomSceneTracker : public IPointerTracker { private: