Initial commit - some engine bugs stopping compiling
This commit is contained in:
17
third-party/glad/test/c/compile/gl/alias/001/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/001/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Full compatibility GL, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/alias/002/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/002/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Full core GL, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/alias/003/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/003/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* No extensions compatibility GL, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug /* extension should be added by aliasing */
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/alias/004/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/004/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* No extensions core GL, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug /* extension should be added by aliasing */
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/alias/005/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/005/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* GL 2.1 All extensions, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/alias/006/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/alias/006/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* GL 2.1 No extensions, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug /* extension should be added by aliasing */
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
14
third-party/glad/test/c/compile/gl/alias/007/test.c
vendored
Normal file
14
third-party/glad/test/c/compile/gl/alias/007/test.c
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* GL 4.6 No extensions, with aliasing
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core=4.6" --extensions="" c --alias
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) glActiveTextureARB;
|
||||
return 0;
|
||||
}
|
||||
18
third-party/glad/test/c/compile/gl/debug/001/test.c
vendored
Normal file
18
third-party/glad/test/c/compile/gl/debug/001/test.c
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Full compatibility debug GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
#include <stddef.h>
|
||||
|
||||
int main(void) {
|
||||
gladSetGLPreCallback(NULL);
|
||||
gladSetGLPostCallback(NULL);
|
||||
gladInstallGLDebug();
|
||||
gladUninstallGLDebug();
|
||||
return 0;
|
||||
}
|
||||
13
third-party/glad/test/c/compile/gl/debug/002/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/debug/002/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Full core debug GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
13
third-party/glad/test/c/compile/gl/debug/003/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/debug/003/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* No extensions compatibility debug GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
13
third-party/glad/test/c/compile/gl/debug/004/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/debug/004/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* No extensions core debug GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
13
third-party/glad/test/c/compile/gl/debug/005/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/debug/005/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Debug GL 2.1 All extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
13
third-party/glad/test/c/compile/gl/debug/006/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/debug/006/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Debug GL 2.1 No extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --debug
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/001/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/001/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Full compatibility GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/002/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/002/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Full core GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/003/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/003/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* No extensions compatibility GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifdef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/004/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/004/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* No extensions core GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifdef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/005/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/005/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* GL 2.1 All extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
17
third-party/glad/test/c/compile/gl/default/006/test.c
vendored
Normal file
17
third-party/glad/test/c/compile/gl/default/006/test.c
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* GL 2.1 No extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifdef GL_KHR_debug
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
22
third-party/glad/test/c/compile/gl/default/007/test.c
vendored
Normal file
22
third-party/glad/test/c/compile/gl/default/007/test.c
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Issue #171. Enums being aliased, but the enum that they are aliased to
|
||||
* do not exist (e.g. because they don't exist in this profile).
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core=4.5" --extensions="" c --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#if GL_CLIP_DISTANCE0 != 0x3000
|
||||
#error
|
||||
#endif
|
||||
|
||||
#if GL_MAX_CLIP_DISTANCES != 0x0D32
|
||||
#error
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/001/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/001/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Full compatibility GL MX header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/002/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/002/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Full core GL MX header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/003/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/003/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* No extensions compatibility GL MX header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/004/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/004/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* No extensions core GL MX header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/005/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/005/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* MX header only GL 2.1 All extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/header-only+mx/006/test.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/header-only+mx/006/test.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* MX header only GL 2.1 No extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
32
third-party/glad/test/c/compile/gl/header-only+mx/007/test.c
vendored
Normal file
32
third-party/glad/test/c/compile/gl/header-only+mx/007/test.c
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* MX header only, global generation, should compile basic API
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
typedef void (*VOID_FUNCPTR)(void);
|
||||
|
||||
VOID_FUNCPTR loader_userptr(void *userptr, const char *name) {
|
||||
(void) name;
|
||||
(void) userptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VOID_FUNCPTR loader(const char *name) {
|
||||
(void) name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
|
||||
gladLoadGLContextUserPtr(&gl, loader_userptr, NULL);
|
||||
gladLoaderLoadGLContext(&gl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/001/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/001/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Full compatibility GL header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/002/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/002/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Full core GL header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/003/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/003/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* No extensions compatibility GL header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/004/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/004/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* No extensions core GL header only
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/005/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/005/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Header only GL 2.1 All extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
15
third-party/glad/test/c/compile/gl/header-only/006/test.c
vendored
Normal file
15
third-party/glad/test/c/compile/gl/header-only/006/test.c
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Header only GL 2.1 No extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --header-only
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
(void) gladLoaderLoadGL();
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/001/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/001/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Full compatibility GL MX
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/002/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/002/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Full core GL MX
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/003/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/003/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* No extensions compatibility GL MX
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/004/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/004/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* No extensions core GL MX
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/005/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/005/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* MX GL 2.1 All extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
16
third-party/glad/test/c/compile/gl/mx+mx-global/006/test_disabled.c
vendored
Normal file
16
third-party/glad/test/c/compile/gl/mx+mx-global/006/test_disabled.c
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* MX GL 2.1 No extensions
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
(void) gladLoaderLoadGL();
|
||||
(void) gladLoaderLoadGLContext(&gl);
|
||||
return 0;
|
||||
}
|
||||
40
third-party/glad/test/c/compile/gl/mx+mx-global/007/test_disabled.c
vendored
Normal file
40
third-party/glad/test/c/compile/gl/mx+mx-global/007/test_disabled.c
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* MX global generation, should compile basic API
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef void (*VOID_FUNCPTR)(void);
|
||||
|
||||
VOID_FUNCPTR loader_userptr(void *userptr, const char *name) {
|
||||
(void) name;
|
||||
(void) userptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VOID_FUNCPTR loader(const char *name) {
|
||||
(void) name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
GladGLContext gl = {0};
|
||||
|
||||
gladLoadGLContextUserPtr(&gl, loader_userptr, NULL);
|
||||
gladLoadGLContext(&gl, loader);
|
||||
gladLoaderLoadGLContext(&gl);
|
||||
|
||||
gladLoadGLUserPtr(loader_userptr, NULL);
|
||||
gladLoadGL(loader);
|
||||
gladLoaderLoadGL();
|
||||
|
||||
gladSetGLContext(&gl);
|
||||
(void) gladGetGLContext();
|
||||
return 0;
|
||||
}
|
||||
|
||||
14
third-party/glad/test/c/compile/gl/mx+mx-global/008/test_disabled.c
vendored
Normal file
14
third-party/glad/test/c/compile/gl/mx+mx-global/008/test_disabled.c
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Full compatibility GL MX should not contain any symbols in COMMON section,
|
||||
* to prevent linking issues with OSX.
|
||||
*
|
||||
* Only tested here under the assumption that this build contains the most symbols.
|
||||
*
|
||||
* See: https://github.com/Dav1dde/glad/issues/158
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global
|
||||
* COMPILE: $GCC -c -o $tmp/test.o -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: [ "$(nm $tmp/test.o | grep ' C ' | wc -l)" -eq "0" ]
|
||||
*/
|
||||
|
||||
#error "this testfile should not be compiled"
|
||||
13
third-party/glad/test/c/compile/gl/on-demand/001/test.c
vendored
Normal file
13
third-party/glad/test/c/compile/gl/on-demand/001/test.c
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Full on demand GL
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
14
third-party/glad/test/c/compile/gl/on-demand/002/test.c
vendored
Normal file
14
third-party/glad/test/c/compile/gl/on-demand/002/test.c
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Full on demand GL with loader
|
||||
*
|
||||
* GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand --loader
|
||||
* COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl
|
||||
* RUN: $tmp/test
|
||||
*/
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user