- [Psy-X] fix WebGL 1.0 matrix issue

This commit is contained in:
Ilya Shurumov 2021-06-22 10:17:18 +06:00 committed by InspirationByte
parent 7a0afe760e
commit 7171f289cc
3 changed files with 6 additions and 18 deletions

View File

@ -12,7 +12,7 @@
# define OGLES_VERSION (3)
#elif defined(__EMSCRIPTEN__)
# define RENDERER_OGLES
# define OGLES_VERSION (3)
# define OGLES_VERSION (2)
#elif defined(__ANDROID__)
# define RENDERER_OGLES
# define OGLES_VERSION (3)

View File

@ -1180,12 +1180,12 @@ void GR_Perspective3D(const float fov, const float width, const float height, co
float persp[16] = {
w, 0, 0, 0,
0, h, 0, 0,
0, 0, (zFar + zNear) / (zFar - zNear), -(2 * zFar * zNear) / (zFar - zNear),
0, 0, 1, 0
0, 0, (zFar + zNear) / (zFar - zNear), 1,
0, 0, -(2 * zFar * zNear) / (zFar - zNear), 0
};
#if defined(USE_OPENGL)
glUniformMatrix4fv(u_projection3DLoc, 1, GL_TRUE, persp);
glUniformMatrix4fv(u_projection3DLoc, 1, GL_FALSE, persp);
#endif
}

View File

@ -41,16 +41,10 @@ workspace "REDRIVER2"
platforms { "emscripten" }
buildoptions {
--"-s USE_PTHREADS=1",
--"-s PTHREAD_POOL_SIZE=8",
--"-s ABORTING_MALLOC=0",
--"-s FETCH=1",
--"-s PROXY_TO_PTHREAD=1",
--"-s WASM=1",
"-s TOTAL_MEMORY=1073741824",
"-s USE_SDL=2",
"-s FULL_ES2=1",
"-s USE_WEBGL2=1",
--"-s USE_WEBGL2=1",
"-s ASYNCIFY=1",
"-s ALLOW_MEMORY_GROWTH=1",
"-s GL_TESTING=1",
@ -64,16 +58,10 @@ workspace "REDRIVER2"
"-Wno-format",
}
linkoptions {
--"-s USE_PTHREADS=1",
--"-s PTHREAD_POOL_SIZE=8",
--"-s ABORTING_MALLOC=0",
--"-s FETCH=1",
--"-s PROXY_TO_PTHREAD=1",
--"-s WASM=1",
"-s TOTAL_MEMORY=1073741824",
"-s USE_SDL=2",
"-s FULL_ES2=1",
"-s USE_WEBGL2=1",
--"-s USE_WEBGL2=1",
"-s ASYNCIFY=1",
"-s ALLOW_MEMORY_GROWTH=1",
"-s GL_TESTING=1",