Merge pull request #166 from olliwang/pow2check

Fix for issue #162
This commit is contained in:
Mikko Mononen 2014-09-04 23:16:19 +03:00
commit 24ae5f0fb9

View File

@ -642,7 +642,7 @@ static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int im
#ifdef NANOVG_GLES2
// Check for non-power of 2.
if (glnvg__nearestPow2(w) != (unsigned int)w || glnvg__nearestPow2(h) == (unsigned int)h) {
if (glnvg__nearestPow2(w) != (unsigned int)w || glnvg__nearestPow2(h) != (unsigned int)h) {
// No repeat
if ((imageFlags & NVG_IMAGE_REPEATX) != 0 || (imageFlags & NVG_IMAGE_REPEATY) != 0) {
printf("Repeat X/Y is not supported for non power-of-two textures (%d x %d)\n", w, h);