From: Alexis Naveros Date: Wed, 25 Nov 2015 14:56:13 +0000 (-0500) Subject: ecere/gfx/newFonts: Bug fix: Vertex/texcoord GL type should be GL_SHORT, not GL_UNSIG... X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=8df167ca37144cfbbd56cfef092421fd2241c67f ecere/gfx/newFonts: Bug fix: Vertex/texcoord GL type should be GL_SHORT, not GL_UNSIGNED_SHORT, caused unwanted clipping near viewport edges --- diff --git a/ecere/src/gfx/newFonts/cc/mmhashinline.h b/ecere/src/gfx/newFonts/cc/mmhashinline.h index b277e87..913e573 100644 --- a/ecere/src/gfx/newFonts/cc/mmhashinline.h +++ b/ecere/src/gfx/newFonts/cc/mmhashinline.h @@ -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; diff --git a/ecere/src/gfx/newFonts/drawManager.ec b/ecere/src/gfx/newFonts/drawManager.ec index 0fca846..2e67f76 100644 --- a/ecere/src/gfx/newFonts/drawManager.ec +++ b/ecere/src/gfx/newFonts/drawManager.ec @@ -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 ) { diff --git a/ecere/src/gfx/newFonts/fontRenderer.ec b/ecere/src/gfx/newFonts/fontRenderer.ec index f09e0e5..bf0ad5e 100644 --- a/ecere/src/gfx/newFonts/fontRenderer.ec +++ b/ecere/src/gfx/newFonts/fontRenderer.ec @@ -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];