Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/Kode/Kinc
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 26, 2023
2 parents 421d669 + b611286 commit a2f5e87
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions Backends/System/Wasm/Sources/GL/gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions Sources/kinc/network/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ KINC_FUNC unsigned kinc_url_to_int(const char *url, int port);
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>

#if defined(KORE_WINDOWS) || defined(KORE_WINDOWSAPP)

Expand Down
3 changes: 3 additions & 0 deletions miniClib/errno.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

#define errno 0
4 changes: 4 additions & 0 deletions miniClib/stdlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*)) {

}
2 changes: 2 additions & 0 deletions miniClib/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2f5e87

Please sign in to comment.