mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-10 15:14:28 +02:00
SDL2 turn off some extensions (TODO)
This commit is contained in:
@@ -99,7 +99,9 @@ struct ShaderCache {
|
||||
compile(Core::passWater, Shader::WATER_SIMULATE, fx, RS_COLOR_WRITE);
|
||||
compile(Core::passWater, Shader::WATER_DROP, fx, RS_COLOR_WRITE);
|
||||
compile(Core::passWater, Shader::WATER_RAYS, fx, RS_COLOR_WRITE | RS_DEPTH_TEST);
|
||||
compile(Core::passWater, Shader::WATER_CAUSTICS, fx, RS_COLOR_WRITE);
|
||||
if (Core::support.derivatives) {
|
||||
compile(Core::passWater, Shader::WATER_CAUSTICS, fx, RS_COLOR_WRITE);
|
||||
}
|
||||
compile(Core::passWater, Shader::WATER_COMPOSE, fx, RS_COLOR_WRITE | RS_DEPTH_TEST);
|
||||
}
|
||||
|
||||
|
@@ -195,6 +195,7 @@ namespace Core {
|
||||
bool depthTexture;
|
||||
bool shadowSampler;
|
||||
bool discardFrame;
|
||||
bool derivatives;
|
||||
bool texNPOT;
|
||||
bool tex3D;
|
||||
bool texRG;
|
||||
@@ -258,6 +259,8 @@ namespace Core {
|
||||
#else
|
||||
if (value > LOW && !(support.texFloat || support.texHalf))
|
||||
value = LOW;
|
||||
if (value > MEDIUM && !support.derivatives)
|
||||
value = MEDIUM;
|
||||
water = value;
|
||||
#endif
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#include <SDL2/SDL_opengl_glext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif defined(_OS_RPI) || defined(_OS_CLOVER)
|
||||
#include <GLES2/gl2.h>
|
||||
@@ -1142,9 +1142,11 @@ namespace GAPI {
|
||||
support.texNPOT = GLES3 || extSupport(ext, "_texture_npot") || extSupport(ext, "_texture_non_power_of_two");
|
||||
support.texRG = GLES3 || extSupport(ext, "_texture_rg "); // hope that isn't last extension in string ;)
|
||||
#ifdef _GAPI_GLES
|
||||
support.tex3D = GLES3;
|
||||
support.derivatives = GLES3 || _GL_OES_standard_derivatives;
|
||||
support.tex3D = GLES3;
|
||||
#else
|
||||
support.tex3D = glTexImage3D != NULL;
|
||||
support.derivatives = true;
|
||||
support.tex3D = glTexImage3D != NULL;
|
||||
#endif
|
||||
support.texBorder = extSupport(ext, "_texture_border_clamp");
|
||||
support.maxAniso = extSupport(ext, "_texture_filter_anisotropic");
|
||||
@@ -1153,9 +1155,15 @@ namespace GAPI {
|
||||
support.texFloatLinear = support.colorFloat || extSupport(ext, "GL_ARB_texture_float") || extSupport(ext, "_texture_float_linear");
|
||||
support.texFloat = support.texFloatLinear || extSupport(ext, "_texture_float");
|
||||
support.texHalfLinear = support.colorHalf || extSupport(ext, "GL_ARB_texture_float") || extSupport(ext, "_texture_half_float_linear") || extSupport(ext, "_color_buffer_half_float");
|
||||
|
||||
support.texHalf = support.texHalfLinear || extSupport(ext, "_texture_half_float");
|
||||
support.clipDist = false; // TODO
|
||||
|
||||
#ifdef SDL2_GLES
|
||||
support.shaderBinary = false; // TODO
|
||||
support.VAO = false; // TODO
|
||||
support.shadowSampler = false; // TODO
|
||||
#endif
|
||||
|
||||
#ifdef PROFILE
|
||||
support.profMarker = extSupport(ext, "_KHR_debug");
|
||||
@@ -1240,7 +1248,7 @@ namespace GAPI {
|
||||
strcat(GLSL_HEADER_FRAG, "#extension GL_OES_standard_derivatives : enable\n");
|
||||
}
|
||||
if (support.shadowSampler) {
|
||||
strcat(GLSL_HEADER_FRAG, "precision lowp sampler2DShadow;\n");
|
||||
strcat(GLSL_HEADER_FRAG, "#define sampler2DShadow lowp sampler2DShadow\n");
|
||||
}
|
||||
strcat(GLSL_HEADER_FRAG, "precision lowp int;\n"
|
||||
"precision highp float;\n"
|
||||
|
Reference in New Issue
Block a user