Procházet zdrojové kódy

Corrected web issue

pull/838/head
Ray před 6 roky
rodič
revize
3f7b14aeed
1 změnil soubory, kde provedl 1 přidání a 13 odebrání
  1. +1
    -13
      src/rlgl.h

+ 1
- 13
src/rlgl.h Zobrazit soubor

@ -1559,8 +1559,6 @@ void rlglInit(int width, int height)
// NOTE: Only check on OpenGL ES, OpenGL 3.3 has VAO support as core feature
if (strcmp(extList[i], (const char *)"GL_OES_vertex_array_object") == 0)
{
vaoSupported = true;
// The extension is supported by our hardware and driver, try to get related functions pointers
// NOTE: emscripten does not support VAOs natively, it uses emulation and it reduces overall performance...
glGenVertexArrays = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress("glGenVertexArraysOES");
@ -1568,19 +1566,9 @@ void rlglInit(int width, int height)
glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArraysOES");
//glIsVertexArray = (PFNGLISVERTEXARRAYOESPROC)eglGetProcAddress("glIsVertexArrayOES"); // NOTE: Fails in WebGL, omitted
if (glGenVertexArrays == NULL) printf("glGenVertexArrays is NULL.\n"); // WEB: ISSUE FOUND! ...but why?
if (glBindVertexArray == NULL) printf("glBindVertexArray is NULL.\n"); // WEB: ISSUE FOUND! ...but why?
if ((glGenVertexArrays != NULL) && (glBindVertexArray != NULL) && (glDeleteVertexArrays != NULL)) vaoSupported = true;
}
// TODO: HACK REVIEW!
// For some reason on raylib 2.5, VAO usage breaks the build
// error seems related to function pointers but I can not get detailed info...
// Avoiding VAO usage is the only solution for now... :(
// Ref: https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html
#if defined(PLATFORM_WEB)
vaoSupported = false;
#endif
// Check NPOT textures support
// NOTE: Only check on OpenGL ES, OpenGL 3.3 has NPOT textures full support as core feature
if (strcmp(extList[i], (const char *)"GL_OES_texture_npot") == 0) texNPOTSupported = true;

Načítá se…
Zrušit
Uložit