diff Framework/Scene2D/Internals/OpenGLTextProgram.cpp @ 693:9a474e90e832

Fixed a bunch of truncation warnings in various parts of the library
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 17 May 2019 08:49:55 +0200
parents e3f21a265be5
children 5c551f078c18
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/OpenGLTextProgram.cpp	Thu May 16 20:39:30 2019 +0200
+++ b/Framework/Scene2D/Internals/OpenGLTextProgram.cpp	Fri May 17 08:49:55 2019 +0200
@@ -156,7 +156,8 @@
 
         double dx, dy;  // In pixels
         ComputeAnchorTranslation(dx, dy, data.GetAnchor(), 
-                                 data.GetTextWidth(), data.GetTextHeight(), data.GetBorder());
+                                 data.GetTextWidth(), data.GetTextHeight(),
+                                 static_cast<unsigned int>(data.GetBorder()));
       
         double x = data.GetX();
         double y = data.GetY();
@@ -182,7 +183,8 @@
 
         glEnable(GL_BLEND);
         glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-        glDrawArrays(GL_TRIANGLES, 0, data.GetCoordinatesCount() / COMPONENTS);
+        glDrawArrays(GL_TRIANGLES, 0, 
+          static_cast<GLsizei>(data.GetCoordinatesCount() / COMPONENTS));
         glDisable(GL_BLEND);
 
         glDisableVertexAttribArray(positionLocation_);