Initial commit - some engine bugs stopping compiling

This commit is contained in:
Will
2026-03-29 15:52:42 +01:00
commit 3d573a200e
361 changed files with 332759 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/*
* GLES2 No extensions, with aliasing
*
* Issue: https://github.com/Dav1dde/glad/issues/334
*
* GLAD: $GLAD --out-path=$tmp --api="gles2=3.2" --extensions="" c --alias
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl
* RUN: $tmp/test
*/
#include <glad/gles2.h>
int main(void) {
(void) glGenVertexArraysOES;
return 0;
}

View File

@@ -0,0 +1,13 @@
/*
* Full GLES2
*
* GLAD: $GLAD --out-path=$tmp --api="gles2" c
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl
* RUN: $tmp/test
*/
#include <glad/gles2.h>
int main(void) {
return 0;
}

View File

@@ -0,0 +1,13 @@
/*
* Full GLES2 with loader
*
* GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c $tmp/src/gles2.c -ldl
* RUN: $tmp/test
*/
#include <glad/gles2.h>
int main(void) {
return 0;
}

View File

@@ -0,0 +1,24 @@
/*
* Emscripten GLES2 + EGL header only.
* Related Issues: #387
*
* GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader --header-only
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
* RUN: $tmp/test
*/
#include <stddef.h>
#define GLAD_GLES2_IMPLEMENTATION
#define GLAD_PLATFORM_EMSCRIPTEN 1
#include <glad/egl.h> /* egl before gles2 */
#include <glad/gles2.h>
__eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) {
GLAD_UNUSED(name);
return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL;
}
int main(void) {
return 0;
}

View File

@@ -0,0 +1,28 @@
/*
* Emscripten GLES2 + header only. See also 003.
* Related Issues: #387
*
* GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader --header-only
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl -Wno-pedantic
* RUN: $tmp/test
*/
#include <stddef.h>
#define GLAD_GLES2_IMPLEMENTATION
#define GLAD_PLATFORM_EMSCRIPTEN 1
#include <glad/gles2.h>
/*
* egl after gles2
* this is not correct, that's why we disable pedantic but it should still compile without
*/
#include <glad/egl.h>
__eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) {
GLAD_UNUSED(name);
return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL;
}
int main(void) {
return 0;
}

View File

@@ -0,0 +1,23 @@
/*
* Emscripten GLES2 + header only. See also 003.
* Related Issues: #387
*
* GLAD: $GLAD --out-path=$tmp --api="gles2" c --loader --header-only
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
* RUN: $tmp/test
*/
#include <stddef.h>
#define GLAD_GLES2_IMPLEMENTATION
#define GLAD_PLATFORM_EMSCRIPTEN 1
#include <glad/gles2.h>
__eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) {
GLAD_UNUSED(name);
return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL;
}
int main(void) {
return 0;
}

View File

@@ -0,0 +1,13 @@
/*
* Full on demand GLES2
*
* GLAD: $GLAD --out-path=$tmp --api="gles2" c --on-demand
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl
* RUN: $tmp/test
*/
#include <glad/gles2.h>
int main(void) {
return 0;
}

View File

@@ -0,0 +1,13 @@
/*
* Full on demand GLES2 with loader
*
* GLAD: $GLAD --out-path=$tmp --api="gles2,egl" c --on-demand --loader
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c $tmp/src/egl.c -ldl
* RUN: $tmp/test
*/
#include <glad/gles2.h>
int main(void) {
return 0;
}