Browse Source

Fix texture completeness for non-POT textures on GLES2/WebGL

shared-context
Andre Weissflog 10 years ago
parent
commit
e9add93849
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/nanovg_gl.h

+ 3
- 0
src/nanovg_gl.h View File

@@ -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);


Loading…
Cancel
Save