ecere/gfx/newFonts: Bug fix: Vertex/texcoord GL type should be GL_SHORT, not GL_UNSIG...
authorAlexis Naveros <alexis@ecere.com>
Wed, 25 Nov 2015 14:56:13 +0000 (09:56 -0500)
committerJerome St-Louis <jerome@ecere.com>
Wed, 2 Nov 2016 16:32:40 +0000 (12:32 -0400)
ecere/src/gfx/newFonts/cc/mmhashinline.h
ecere/src/gfx/newFonts/drawManager.ec
ecere/src/gfx/newFonts/fontRenderer.ec

index b277e87..913e573 100644 (file)
@@ -398,7 +398,7 @@ int HASH_DECLARE_DIRECTREADORADDENTRY( void *hashtable, void *readaddentry, int
 int HASH_DECLARE_DIRECTDELETEENTRY( void *hashtable, void *deleteentry, int readflag )
 {
   int cmpvalue;
-  uint32_t hashkey, srckey, srcpos, targetpos, targetkey, entrycount;
+  uint32_t hashkey, srckey, srcpos, targetpos = 0, targetkey, entrycount;
   uint32_t delbase;
   void *entry, *srcentry, *targetentry;
   mmHashTable *table;
index 0fca846..2e67f76 100644 (file)
@@ -827,12 +827,12 @@ public class DrawManager
       if( program->vertexloc != -1 )
       {
          glEnableVertexAttribArray( program->vertexloc );
-         glVertexAttribPointer( program->vertexloc, 2, GL_UNSIGNED_SHORT, GL_FALSE, sizeof(DMDrawVertex), (void *)OFFSET(DMDrawVertex,vertex) );
+         glVertexAttribPointer( program->vertexloc, 2, GL_SHORT, GL_FALSE, sizeof(DMDrawVertex), (void *)OFFSET(DMDrawVertex,vertex) );
       }
       if( program->texcoord0loc != -1 )
       {
          glEnableVertexAttribArray( program->texcoord0loc );
-         glVertexAttribPointer( program->texcoord0loc, 2, GL_UNSIGNED_SHORT, GL_FALSE, sizeof(DMDrawVertex), (void *)OFFSET(DMDrawVertex,texcoord0) );
+         glVertexAttribPointer( program->texcoord0loc, 2, GL_SHORT, GL_FALSE, sizeof(DMDrawVertex), (void *)OFFSET(DMDrawVertex,texcoord0) );
       }
       if( program->colorloc != -1 )
       {
index f09e0e5..bf0ad5e 100644 (file)
@@ -102,7 +102,7 @@ public:
    {
      if(texture)
      {
-        int glformat;
+        int glformat = GL_RED;
         int w = rect[2] - rect[0];
         int h = rect[3] - rect[1];