summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorRay <[email protected]>2019-04-23 18:10:38 +0200
committerRay <[email protected]>2019-04-23 18:10:38 +0200
commit0c567cd259285fb33b3e2ab514c48322da0a0000 (patch)
tree40e15773092fd0180cd4f9ac35d94bf546a877a2 /src/rlgl.h
parent3aafa9d5ba3fa0a2cbb5759b569c8772a0385d41 (diff)
downloadraylib-0c567cd259285fb33b3e2ab514c48322da0a0000.tar.gz
raylib-0c567cd259285fb33b3e2ab514c48322da0a0000.zip
WARNING: Issues on web building
Found some issues when building for web using latest emscripten 1.38.30, traced the error and found that eglGetProcAdress does not return function pointers for VAO functionality, supported by extension. It requires more investigation but now it works (avoiding VAO usage)
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index dd2929ca..71a1dc4b 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -1559,7 +1559,19 @@ void rlglInit(int width, int height)
glBindVertexArray = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress("glBindVertexArrayOES");
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?
}
+
+ // 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