feat(webgl): Replace legacy GL with modern OpenGL ES 3.0
Major refactoring to remove ALL legacy OpenGL immediate mode calls from WEBGL_GAL and replace them with WebGL 2.0/OpenGL ES 3.0 compatible code. Key changes: - Add MVP matrix uniform support (replaces glMatrixMode/glOrtho/glLoadMatrix) - Add matrix math helpers (computeOrthoMatrix, multiplyMatrix4x4, etc.) - Replace glBegin/glEnd/glVertex with vertex manager pattern - Rewrite DrawCursor to use vertex manager and DrawLine() calls - Rewrite DrawBitmap to use vertex manager with SHADER_FONT mode - Replace glEnableClientState with glVertexAttribPointer - Replace glDrawBuffer with glDrawBuffers (WebGL 2.0 API) - Add fullscreen_quad.cpp/h for compositor Present() - Update SHADER class with mat4 uniform support - Add MultiplyMatrix() to vertex_manager for Transform() - Remove all legacy GL stubs from wasm_stubs.cpp Build now completes with FULL_ES3 mode (no LEGACY_GL_EMULATION). Remaining issue: wxWidgets GL library calls glColor3f internally. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6c2cf85177
commit
d2f1a496f5
27 changed files with 840 additions and 349 deletions
|
|
@ -61,6 +61,11 @@ fi
|
|||
# (Makefile only tracks object file dependencies, not linker flag changes)
|
||||
rm -f "$OUTPUT_DIR"/*.js "$OUTPUT_DIR"/*.wasm 2>/dev/null || true
|
||||
|
||||
# Generate shaders (converts GLSL 1.20 to GLSL ES 3.00)
|
||||
echo ""
|
||||
echo "Generating WebGL shaders..."
|
||||
python3 generate_shaders.py
|
||||
|
||||
echo ""
|
||||
echo "Building..."
|
||||
if [ "$DEBUG_BUILD" = "1" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue