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