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.

This commit is contained in:
2025-09-01 12:13:56 -07:00
parent cca61ea163
commit b548b7bb26
14 changed files with 1416 additions and 14 deletions

View File

@@ -92,11 +92,32 @@
"ArenaMark GetArenaMark(Arena* arena)",
"ArenaMark GetScratch()",
"ArenaMark GetScratch1(Arena* conflictArena)",
"GlId jsGlCreateBuffer()",
"GlId jsGlCreateProgram()",
"GlId jsGlCreateShader(GlEnum shaderType)",
"GlId jsGlCreateVertexArray()",
"bool jsGlGetProgramParameterBool(GlId programId, GlEnum parameter)",
"bool jsGlGetShaderParameterBool(GlId shaderId, GlEnum parameter)",
"inline void* ReallocMem(Arena* arena, void* oldPntr, u32 oldSize, u32 newSize)",
"inline void* ReallocMemUnaligned(Arena* arena, void* oldPntr, u32 oldSize, u32 newSize)",
"int jsGlGetProgramParameterInt(GlId programId, GlEnum parameter)",
"int jsGlGetShaderParameterInt(GlId shaderId, GlEnum parameter)",
"void InitGlobalArenas(u32 scratchArenasSize)",
"void ResetToArenaMark(ArenaMark arenaMark)",
"void ResetToMark(Arena* arena, u32 mark)",
"void jsGlAttachShader(GlId programId, GlId shaderId)",
"void jsGlBindBuffer(GlEnum bufferType, GlId bufferId)",
"void jsGlBindVertexArray(GlId vaoId)",
"void jsGlBufferData(GlEnum bufferType, u32 dataLength, const void* dataPntr, GlEnum usageHint)",
"void jsGlClear(int bufferBits)",
"void jsGlClearColor(r32 rValue, r32 gValue, r32 bValue, r32 aValue)",
"void jsGlCompileShader(GlId shaderId)",
"void jsGlDrawArrays(GlEnum geometryType, int startIndex, int count)",
"void jsGlEnableVertexAttribArray(GlEnum location)",
"void jsGlLinkProgram(GlId programId)",
"void jsGlShaderSource(GlId shaderId, int sourceLength, const char* sourcePntr)",
"void jsGlUseProgram(GlId programId)",
"void jsGlVertexAttribPointer(GlEnum attribLocation, int componentCount, GlEnum componentType, bool normalized, int stride, int offset)",
"void* AllocMemUnaligned(Arena* arena, u32 numBytes)",
"void* ReallocMemAligned(Arena* arena, void* oldPntr, u32 oldSize, u32 newSize, u32 newAlignment)",
],