aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/tinygl-0.4-ugfx/src/error.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/tinygl-0.4-ugfx/src/error.c')
-rw-r--r--3rdparty/tinygl-0.4-ugfx/src/error.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/3rdparty/tinygl-0.4-ugfx/src/error.c b/3rdparty/tinygl-0.4-ugfx/src/error.c
new file mode 100644
index 00000000..a1c0a6df
--- /dev/null
+++ b/3rdparty/tinygl-0.4-ugfx/src/error.c
@@ -0,0 +1,22 @@
+#include <stdarg.h>
+#include <assert.h>
+#include "zgl.h"
+
+void gl_fatal_error(char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap,format);
+
+ fprintf(stderr,"TinyGL: fatal error: ");
+ vfprintf(stderr,format,ap);
+ fprintf(stderr,"\n");
+ exit(1);
+
+ va_end(ap);
+}
+
+void gl_assert(int test)
+{
+ assert(test);
+}