Taylor Robbins robbitay
  • Joined on 2025-08-26
robbitay pushed to main at robbitay/CWasm 2025-09-02 23:05:57 +00:00
04028b29d3 Used __builtin_wasm_memory_size(0) instead of having the Javascript code call init_mem with the initial page count. Added a simple <div> below the canvas that can hold any number of labels that can be filled/updated through jsSetLabel which lives in a new file misc_functions.js.
robbitay pushed to main at robbitay/CWasm 2025-09-02 19:20:17 +00:00
f45c2d88e0 Added some simple background textures from OpenGameArt.org and rendered them with a little parallax effect
robbitay pushed to main at robbitay/CWasm 2025-09-02 19:00:31 +00:00
3aee6123c6 Removed unneeded semicolons in macros for memset, memcpy, and memmove in std/string.h
robbitay pushed to main at robbitay/CWasm 2025-09-02 18:58:58 +00:00
bed90ad8e1 Small change to test_app.c. Committing as I'm reconfiguring local clone of the repo so I don't lose the work
robbitay deleted branch testb from robbitay/CWasm 2025-09-02 18:55:38 +00:00
robbitay pushed to main at robbitay/CWasm 2025-09-02 18:47:38 +00:00
f2d590be13 Added an asynchronous resource loading mechanism through App_GetResourcePath and App_ResourceLoaded. Added stb_image.h and used it to parse a .png file loaded from the server and upload it to app.testTexture. There is some ugliness around the edges images with transparency, probably caused by something pre-multiplied alpha related.
robbitay pushed to main at robbitay/CWasm 2025-09-02 07:15:06 +00:00
1a9775d670 Added cwasm_vectors.c and cwasm_matrices.c. Vectors API is completely finished, Matrices API is partially finished. Added Clamp(value, min, max) macro to cwasm.h. Fixed types on jsGl functions that take vectors or matrices (and Arena*).
robbitay pushed to main at robbitay/CWasm 2025-09-02 04:53:27 +00:00
b62f0d279b Add cAllocMem to cwasm.c which the javascript side can use to allocate memory from an opaque Arena pointer that was passed to it. Used this to implement jsGlGetParameterString, jsGlGetShaderInfoLog, and jsGlGetProgramInfoLog in gl_functions.js. Added NotNull macro and fixed bug in ScratchBegin macro. Added a bool return for App_Initialize which allows us to stop the main loop from beginning (which prevents log spew when something goes wrong)
robbitay pushed to main at robbitay/CWasm 2025-09-02 03:46:28 +00:00
7c61189d3a Added texture related functions to gl_functions.js
robbitay pushed to main at robbitay/CWasm 2025-09-02 02:21:51 +00:00
81f5457b61 Added some more WebGL functions to gl_functions.js. Made the test_app render something more interesting. Added a bool return from App_UpdateAndRender which allows it to request that the application loop ends.
robbitay pushed to main at robbitay/CWasm 2025-09-02 01:50:17 +00:00
42cf6d9e9f Added a bunch of WebGL functions related to shader uniforms to gl_functions.js
robbitay pushed to main at robbitay/CWasm 2025-09-01 19:14:01 +00:00
b548b7bb26 Set up a basic "front-end" for the webassembly module to be tested locally from a data folder (I use python -m http.server). The WebAssembly application is now responsible for all setup/rendering through the WebGL2 context.
robbitay pushed to main at robbitay/CWasm 2025-09-01 00:33:53 +00:00
cca61ea163 Added cwasm_arena.c and cwasm_debug.c. Arena API hasn't been tested well yet. There's also something wrong with our DebugOutputLineBuffer usage for splitting lines to multiple Javascript output calls. Also added an int level to jsStdPrint and a bunch of macros to cwasm.h
robbitay pushed to main at robbitay/CWasm 2025-08-28 20:20:14 +00:00
d0aa7a1d0e Added math.h, stdlib.h, float.h, and stbool.h to std folder (and all their implementations). Opted to NOT implement malloc/free/etc. in favor of having our own functions init_mem, grow_mem, and get_mem.
robbitay pushed to main at robbitay/CWasm 2025-08-28 16:44:37 +00:00
deae3ccd12 Got a basic WebAssembly module compiling with support for calling jsStdPrint through printf implementation (provided by stb_sprintf.h). We have a single function "HelloFromWasm" exported for testing purposes. Pulled in a bunch of standard library headers from PigCore's wasm layer.
robbitay created repository robbitay/CWasm 2025-08-28 14:41:58 +00:00