diff --git a/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/pipeline.c.h b/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/pipeline.c.h index ff18d9396..c659c1f26 100644 --- a/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/pipeline.c.h +++ b/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/pipeline.c.h @@ -157,7 +157,7 @@ static void compileShader(unsigned *id, const char *source, size_t length, kinc_ void kinc_g4_pipeline_compile(kinc_g4_pipeline_t *state) { compileShader(&state->vertex_shader->impl._glid, state->vertex_shader->impl.source, state->vertex_shader->impl.length, KINC_G4_SHADER_TYPE_VERTEX); compileShader(&state->fragment_shader->impl._glid, state->fragment_shader->impl.source, state->fragment_shader->impl.length, KINC_G4_SHADER_TYPE_FRAGMENT); -#ifndef OPENGLES +#ifndef KORE_OPENGL_ES if (state->geometry_shader != NULL) { compileShader(&state->geometry_shader->impl._glid, state->geometry_shader->impl.source, state->geometry_shader->impl.length, KINC_G4_SHADER_TYPE_GEOMETRY); @@ -173,7 +173,7 @@ void kinc_g4_pipeline_compile(kinc_g4_pipeline_t *state) { #endif glAttachShader(state->impl.programId, state->vertex_shader->impl._glid); glAttachShader(state->impl.programId, state->fragment_shader->impl._glid); -#ifndef OPENGLES +#ifndef KORE_OPENGL_ES if (state->geometry_shader != NULL) { glAttachShader(state->impl.programId, state->geometry_shader->impl._glid); } diff --git a/Backends/System/Wasm/Sources/GL/gl.h b/Backends/System/Wasm/Sources/GL/gl.h index e8b30a028..3536173c2 100644 --- a/Backends/System/Wasm/Sources/GL/gl.h +++ b/Backends/System/Wasm/Sources/GL/gl.h @@ -130,6 +130,7 @@ typedef char GLchar; #define GL_INT 0x1404 #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 __attribute__((import_module("imports"), import_name("glUniform1i"))) void glUniform1i(GLint location, GLint v0); __attribute__((import_module("imports"), import_name("glUniform2i"))) void glUniform2i(GLint location, GLint v0, GLint v1); diff --git a/Sources/kinc/network/socket.h b/Sources/kinc/network/socket.h index 09611f22e..0d5c65435 100644 --- a/Sources/kinc/network/socket.h +++ b/Sources/kinc/network/socket.h @@ -133,6 +133,7 @@ KINC_FUNC unsigned kinc_url_to_int(const char *url, int port); #include #include #include +#include #if defined(KORE_WINDOWS) || defined(KORE_WINDOWSAPP) diff --git a/miniClib/errno.h b/miniClib/errno.h new file mode 100644 index 000000000..fe522d1e6 --- /dev/null +++ b/miniClib/errno.h @@ -0,0 +1,3 @@ +#pragma once + +#define errno 0 diff --git a/miniClib/stdlib.c b/miniClib/stdlib.c index 1d3773827..08a813a69 100644 --- a/miniClib/stdlib.c +++ b/miniClib/stdlib.c @@ -12,6 +12,10 @@ int abs(int n) { return n < 0 ? -n : n; } +long long int llabs(long long int n) { + return n < 0 ? -n : n; +} + void qsort(void *base, size_t num, size_t size, int (*compar)(const void*,const void*)) { } diff --git a/miniClib/stdlib.h b/miniClib/stdlib.h index 6f002176d..671f0af9b 100644 --- a/miniClib/stdlib.h +++ b/miniClib/stdlib.h @@ -23,6 +23,8 @@ long int strtol(const char *str, char **endptr, int base); int abs(int n); +long long int llabs(long long int n); + void qsort(void *base, size_t num, size_t size, int (*compar)(const void *, const void *)); #ifdef __cplusplus