mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-16 10:04:28 +02:00
fix compilation warnings and OpenGL errors
This commit is contained in:
@@ -587,7 +587,7 @@ namespace Core {
|
||||
int tFrame;
|
||||
#endif
|
||||
|
||||
Stats() : frame(0), fps(0), frameIndex(0), fpsTime(0) {}
|
||||
Stats() : frame(0), frameIndex(0), fps(0), fpsTime(0) {}
|
||||
|
||||
void start() {
|
||||
dips = tris = rt = cb = 0;
|
||||
|
@@ -4,6 +4,7 @@ R"====(
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
#define MAX_LIGHTS 4
|
||||
#define WATER_FOG_DIST (1.0 / (1024.0 * 6.0))
|
||||
#define WATER_COLOR_DIST (1.0 / (2.0 * 1024.0))
|
||||
#define UNDERWATER_COLOR vec3(0.6, 0.9, 0.9)
|
||||
@@ -21,7 +22,7 @@ varying vec3 vLightVec;
|
||||
|
||||
uniform vec4 uViewPos;
|
||||
uniform mat4 uViewProj;
|
||||
uniform vec4 uLightPos;
|
||||
uniform vec4 uLightPos[MAX_LIGHTS];
|
||||
uniform vec4 uPosScale[2];
|
||||
|
||||
uniform vec4 uTexParam;
|
||||
@@ -76,7 +77,7 @@ uniform sampler2D sNormal;
|
||||
#endif
|
||||
#endif
|
||||
vViewVec = uViewPos.xyz - vCoord.xyz;
|
||||
vLightVec = uLightPos.xyz - vCoord.xyz;
|
||||
vLightVec = uLightPos[0].xyz - vCoord.xyz;
|
||||
}
|
||||
#else
|
||||
uniform sampler2D sDiffuse;
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#else
|
||||
//#define ASSERT(expr) if (expr) {} else { LOG("ASSERT:\n %s:%d\n %s => %s\n", __FILE__, __LINE__, __FUNCTION__, #expr); }
|
||||
#define ASSERT(expr)
|
||||
#define ASSERTV(expr) (expr)
|
||||
#define ASSERTV(expr) (expr) ? 1 : 0
|
||||
|
||||
#ifdef _OS_LINUX
|
||||
#define LOG(...) printf(__VA_ARGS__); fflush(stdout)
|
||||
|
Reference in New Issue
Block a user