Skip to content
Permalink
Browse files

fix desktop modern opengl build

  • Loading branch information...
UnknownShadow200 committed Apr 9, 2019
1 parent 5495faa commit 69e59db6294415f515df76e0fe51f9bd9f45985a
Showing with 9 additions and 1 deletion.
  1. +1 −0 src/Core.h
  2. +8 −1 src/Graphics.c
@@ -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);

0 comments on commit 69e59db

Please sign in to comment.
You can’t perform that action at this time.