[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49968] branches/soc-2012-swiss_cheese/ source/blender/blenfont/intern/blf_glyph.c: Switching Blender Font texture from GL_CLAMP to GL_CLAMP_TO_EDGE, as there is no difference and previous in not supported by GLES.
Alexander Kuznetsov
kuzsasha at gmail.com
Fri Aug 17 21:52:18 CEST 2012
Revision: 49968
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49968
Author: alexk
Date: 2012-08-17 19:52:17 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
Switching Blender Font texture from GL_CLAMP to GL_CLAMP_TO_EDGE, as there is no difference and previous in not supported by GLES.
It is a good idea to add texture api later.
Adding real mode for GLES
Modified Paths:
--------------
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_glyph.c
Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_glyph.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_glyph.c 2012-08-17 19:37:20 UTC (rev 49967)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_glyph.c 2012-08-17 19:52:17 UTC (rev 49968)
@@ -54,6 +54,7 @@
#include "blf_internal.h"
#include "GPU_compatibility.h"
+#include REAL_GL_MODE
GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi)
@@ -183,12 +184,13 @@
glGenTextures(1, &gc->textures[gc->cur_tex]);
glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state = gc->textures[gc->cur_tex]));
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, gc->p2_width, gc->p2_height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, buf);
+
free((void *)buf);
}
More information about the Bf-blender-cvs
mailing list