ecere/gfx/newFonts: Warning Fixes
authorJerome St-Louis <jerome@ecere.com>
Thu, 4 Feb 2016 20:53:11 +0000 (15:53 -0500)
committerJerome St-Louis <jerome@ecere.com>
Mon, 21 Nov 2016 14:18:44 +0000 (09:18 -0500)
ecere/src/gfx/newFonts/drawManager.ec

index 2840017..eb57b8a 100644 (file)
@@ -318,7 +318,7 @@ static inline void OpenGLErrorCheck( const char *file, int line )
 #endif
 
 // Not using 32767.0 ; overflow when converting to int16 due to floating point crud causes problems
-#define DM_IMAGE_ROTATION_NORMFACTOR (24576.0)
+#define DM_IMAGE_ROTATION_NORMFACTOR (24576.0f)
 
 #define DM_VERTEX_NORMSHIFT (2)
 #define DM_VERTEX_NORMFACTOR (4.0f)
@@ -1202,7 +1202,8 @@ public:
    {
       int mindex;
       float norminv;
-      glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)&prevProgram);
+      if(!prevProgram)
+         glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)&prevProgram);
       // while(glGetError());
 
       // ERRORCHECK();