summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-14 18:02:11 +0200
committerRay <[email protected]>2019-05-14 18:02:11 +0200
commit3f7b14aeed8bd3b5abc0dd47532c266944d169b6 (patch)
treea2d8e40959276796043a94cf6dd1f5356cb63e1d /src
parent7eb488a35079a6d940ec92af568407103996e68f (diff)
downloadraylib-3f7b14aeed8bd3b5abc0dd47532c266944d169b6.tar.gz
raylib-3f7b14aeed8bd3b5abc0dd47532c266944d169b6.zip
Corrected web issue
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index d8db16ae..639a107e 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -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;