ADD: WebASM port (no sound/no network)

This commit is contained in:
Kolyah35
2026-03-19 02:26:34 +03:00
parent 4769d4ae72
commit e9914e3fbd
13 changed files with 408 additions and 119 deletions

View File

@@ -10,13 +10,13 @@
#endif
// Other systems might run it, if they #define OPENGL_ES
#if defined(OPENGL_ES) // || defined(ANDROID)
// #if defined(OPENGL_ES) // || defined(ANDROID)
#define USE_VBO
#define GL_QUADS 0x0007
#if defined(__APPLE__)
#import <OpenGLES/ES1/gl.height>
#import <OpenGLES/ES1/glext.height>
#elif defined(ANDROID)
#elif defined(ANDROID) || defined(__EMSCRIPTEN__)
#include <GLES/gl.h>
#include <GLES/glext.h>
#else
@@ -28,18 +28,18 @@
#define glClearDepthf(x) glClearDepth(x)
#define glDepthRangef(a,b) glDepthRange(a,b)
#endif
#else
// Uglyness to fix redeclaration issues
#ifdef WIN32
#include <WinSock2.h>
#include <Windows.h>
#endif
#include <gl/glew.h>
#include <gl/GL.h>
// #else
// // Uglyness to fix redeclaration issues
// #ifdef WIN32
// #include <WinSock2.h>
// #include <Windows.h>
// #endif
// #include <gl/glew.h>
// #include <gl/GL.h>
#define glFogx(a,b) glFogi(a,b)
#define glOrthof(a,b,c,d,e,f) glOrtho(a,b,c,d,e,f)
#endif
// #define glFogx(a,b) glFogi(a,b)
// #define glOrthof(a,b,c,d,e,f) glOrtho(a,b,c,d,e,f)
// #endif
#define GLERRDEBUG 1