You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include"raylib.h"intmain(void) {
constintscreenWidth=800;
constintscreenHeight=450;
InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture loading and drawing");
Texture2Dtexture=LoadTexture("raylib_logo.png");
while (!WindowShouldClose()) {
BeginDrawing();
ClearBackground(RAYWHITE);
DrawTexture(texture, screenWidth / 2-texture.width / 2, screenHeight / 2-texture.height / 2, WHITE);
DrawText("this IS a texture!", 360, 370, 10, GRAY);
EndDrawing();
}
UnloadTexture(texture);
CloseWindow();
return0;
}
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?
Activity
konsumer commentedon Jan 26, 2023
I tried this, too (no texture, use
emscripten_set_main_loop):Which also compiled fine, but does not open a widow.
konsumer commentedon Jan 28, 2023
I saw this but it doesn't seem to work (same problem.)
ShawSumma commentedon May 7, 2023
There's a bunch of bugs and i have little time. RayWASM is not exactly working well.
ShawSumma commentedon May 7, 2023
Originally RayWASM started as a test of integrating api other than WASI into Web49's api.
konsumer commentedon May 7, 2023
I totally understand. No prob!