Open konsumer opened 1 year ago
I tried this, too (no texture, use emscripten_set_main_loop
):
#include <emscripten/emscripten.h>
#include "raylib.h"
const int screenWidth = 800;
const int screenHeight = 450;
void UpdateDrawFrame(void);
int main(void) {
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
CloseWindow();
return 0;
}
void UpdateDrawFrame(void) {
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
EndDrawing();
}
Which also compiled fine, but does not open a widow.
There's a bunch of bugs and i have little time. RayWASM is not exactly working well.
Originally RayWASM started as a test of integrating api other than WASI into Web49's api.
I totally understand. No prob!
So, I downloaded the mac asset from last successful action workflow, and compiled this:
with
./emraylib textures_logo_raylib.c -o textures_logo_raylib
then ran./raywasm textures_logo_raylib.wasm
, and it opens and closes, without error. Do I need to structure my code differently?