From e9add938499695ec3954ddd4a676758b63077a66 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Sat, 30 Aug 2014 13:53:27 +0200 Subject: [PATCH] Fix texture completeness for non-POT textures on GLES2/WebGL --- src/nanovg_gl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nanovg_gl.h b/src/nanovg_gl.h index 90b5659..87f258a 100644 --- a/src/nanovg_gl.h +++ b/src/nanovg_gl.h @@ -663,6 +663,9 @@ static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int im } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); #ifndef NANOVG_GLES2 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);