src/gl/partrenderer.cpp

changeset 250
2837b549e616
parent 246
86a35ce38773
child 259
c27612f0eac0
--- a/src/gl/partrenderer.cpp	Wed Jun 22 16:13:15 2022 +0300
+++ b/src/gl/partrenderer.cpp	Wed Jun 22 16:53:35 2022 +0300
@@ -423,7 +423,7 @@
 		this->viewMatrix * this->modelMatrix,
 		this->projectionMatrix,
 		this->viewportVector);
-	return toQPointF(glm::vec2{projected.x, this->height() - projected.y});
+	return toQPointF(glm::vec2{projected.x, static_cast<float>(this->height()) - projected.y});
 }
 
 bool PartRenderer::isDark() const
@@ -446,7 +446,7 @@
 glm::vec3 PartRenderer::unproject(const glm::vec3& win) const
 {
 	return glm::unProject(
-		glm::vec3{win.x, this->height() - win.y, win.z},
+		glm::vec3{win.x, static_cast<float>(this->height()) - win.y, win.z},
 		this->viewMatrix * this->modelMatrix,
 		this->projectionMatrix,
 		viewportVector);

mercurial