mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
fix desktop modern opengl build
This commit is contained in:
parent
5495faa800
commit
69e59db629
@ -133,6 +133,7 @@ typedef struct TextureRec_ { float U1, V1, U2, V2; } TextureRec;
|
||||
#define CC_BUILD_WEB
|
||||
#define CC_BUILD_POSIX
|
||||
#define CC_BUILD_GLMODERN
|
||||
#define CC_BUILD_GLES
|
||||
#define CC_BUILD_WEBCANVAS
|
||||
#define CC_BUILD_WEBGL
|
||||
#error "Web backend is still a WIP. Please do not publicly mention it, thanks."
|
||||
|
@ -1399,7 +1399,9 @@ static void Gfx_GenFragmentShader(const struct GLShader* shader, String* dst) {
|
||||
int fd = shader->Features & FTR_DENSIT_FOG;
|
||||
int fm = shader->Features & FTR_HASANY_FOG;
|
||||
|
||||
#ifdef CC_BUILD_GLES
|
||||
String_AppendConst(dst, "precision highp float;\n");
|
||||
#endif
|
||||
String_AppendConst(dst, "varying vec4 out_col;\n");
|
||||
if (uv) String_AppendConst(dst, "varying vec2 out_uv;\n");
|
||||
if (uv) String_AppendConst(dst, "uniform sampler2D texImage;\n");
|
||||
@ -1613,7 +1615,12 @@ void Gfx_LoadIdentityMatrix(MatrixType type) {
|
||||
}
|
||||
}
|
||||
|
||||
static void GL_CheckSupport(void) { }
|
||||
static void GL_CheckSupport(void) {
|
||||
#ifndef CC_BUILD_GLES
|
||||
Gfx.CustomMipmapsLevels = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void GL_InitState(void) {
|
||||
glEnableVertexAttribArray(0);
|
||||
glEnableVertexAttribArray(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user