summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2014-10-06 21:19:21 -0500
committerTom Gall <tom.gall@linaro.org>2014-10-06 21:19:21 -0500
commit3b1a3531a754edd151b71db6b472e28913c73611 (patch)
tree5606e2a5b1b43860ccc81cdd77cfc80d15828176
parent3e7ba806a23dfd3d75f9cc156df9229f237f5d04 (diff)
downloadtg-openvg-3b1a3531a754edd151b71db6b472e28913c73611.tar.gz
Better but not quite perfect. VG Buffer image from vgReadPixels
seems to be exactly backwords.
-rw-r--r--tests/font/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/font/main.c b/tests/font/main.c
index 10abf9a..992bbeb 100644
--- a/tests/font/main.c
+++ b/tests/font/main.c
@@ -492,7 +492,7 @@ GLuint CreateVGTexture2D(ESContext *esContext)
glBindTexture ( GL_TEXTURE_2D, textureId );
// Load the texture
- glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, esContext->width, esContext->height, 0, GL_RGB, GL_UNSIGNED_BYTE, tgTextureBuffer);
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGBA, esContext->width, esContext->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tgTextureBuffer);
// Set the filtering mode
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
@@ -578,7 +578,9 @@ void Draw ( ESContext *esContext )
TextMid((VGfloat)(esContext->width / 2),(VGfloat) ( esContext->height / 2),(char *) &text, SerifTypeface, esContext->width/10); // Greetings
// End();
- f = VG_sARGB_8888;
+// f = VG_sARGB_8888;
+
+ f = VG_sRGBA_8888;
vgReadPixels(tgTextureBuffer, esContext->width*sizeof(unsigned int), f, 0, 0, esContext->width, esContext->height);
@@ -624,7 +626,7 @@ int main ( int argc, char *argv[] )
esContext.userData = &userData;
DBG("Step 1. initial EGL");
- esCreateWindow ( &esContext, "Simple Texture 2D", WINDOW_W, WINDOW_H, ES_WINDOW_RGB );
+ esCreateWindow ( &esContext, "Simple Font Test", WINDOW_W, WINDOW_H, ES_WINDOW_RGB );
Init(&esContext);
initFont();