mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-21 18:58:14 +00:00
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)
This commit is contained in:
12
src/rlgl.h
12
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
|
||||
|
Reference in New Issue
Block a user