-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
help needed - please!I need help with this issueI need help with this issueplatform: WebWeb platformWeb platform
Description
Hello,
There is an error when targetting webgl2 and using whatever Draw function you want (like DrawRectangle/cube/text etc)
index.js:7373 Uncaught TypeError: Cannot set properties of undefined (setting 'clientside')
at _glVertexAttribPointer
I did a very minimal example here :
#include <raylib.h>
#include <emscripten.h>
const int screenWidth = 800;
const int screenHeight = 450;
void draw(void) {
BeginDrawing();
ClearBackground(RAYWHITE);
DrawRectangle(200, 150, 400, 200, RED);
DrawText("Hello, WebAssembly with Raylib!", 210, 200, 20, BLACK);
EndDrawing();
}
int main() {
InitWindow(screenWidth, screenHeight, "raylib with Emscripten - Simple Draw");
SetTargetFPS(60);
emscripten_set_main_loop(draw, 0, 1);
CloseWindow();
return 0;
}
compilation flag :
emcc -o index.html testthatfail.c -I/home/tom/raylib-wasm/src
-L/home/tom/raylib-wasm/src -lraylib -DPLATFORM_WEB -s USE_GLFW=3 -s FULL_ES3=1 -s MIN_WEBGL_
VERSION=2 -s MAX_WEBGL_VERSION=2 -s ASYNCIFY
I tried with only full_es2, with different things for memory and so.
For this kind of things it is not really problematic but for my other project I need to create vertex buffer and go with opengl (not rlgl) and use shaders for a cube, and i need the webgl2/opengl300es for my futures things on the project
Metadata
Metadata
Assignees
Labels
help needed - please!I need help with this issueI need help with this issueplatform: WebWeb platformWeb platform