@@ -852,9 +852,9 @@ static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int im
852852 glTexImage2D (GL_TEXTURE_2D , 0 , GL_RGBA , w , h , 0 , GL_RGBA , GL_UNSIGNED_BYTE , data );
853853 break ;
854854 default :
855- #if defined( NANOVG_GLES2 ) || defined (NANOVG_GL2 )
855+ #if defined (NANOVG_GL2 )
856856 glTexImage2D (GL_TEXTURE_2D , 0 , GL_LUMINANCE , w , h , 0 , GL_LUMINANCE , GL_UNSIGNED_BYTE , data );
857- #elif defined(NANOVG_GLES3 )
857+ #elif defined(NANOVG_GLES2 ) || defined( NANOVG_GLES3 )
858858 glTexImage2D (GL_TEXTURE_2D , 0 , GL_R8 , w , h , 0 , GL_RED , GL_UNSIGNED_BYTE , data );
859859#else
860860 glTexImage2D (GL_TEXTURE_2D , 0 , GL_RED , w , h , 0 , GL_RED , GL_UNSIGNED_BYTE , data );
@@ -972,7 +972,7 @@ static int glnvg__renderUpdateTexture(void* uptr, int image, int x, int y, int w
972972 glTexSubImage2D (GL_TEXTURE_2D , 0 , x ,y , w ,h , GL_RGBA , GL_UNSIGNED_BYTE , data );
973973 break ;
974974 default :
975- #if defined(NANOVG_GLES2 ) || defined( NANOVG_GL2 )
975+ #if defined(NANOVG_GL2 )
976976 glTexSubImage2D (GL_TEXTURE_2D , 0 , x ,y , w ,h , GL_LUMINANCE , GL_UNSIGNED_BYTE , data );
977977#else
978978 glTexSubImage2D (GL_TEXTURE_2D , 0 , x ,y , w ,h , GL_RED , GL_UNSIGNED_BYTE , data );
0 commit comments