ref: 1ef97f8a86d8e3fe186cf20cf0dcdcba50fb0831
parent: 6b341f61e1c9da209150d2f8b1940f0b1b241b9c
author: David <gek@katherine>
date: Tue Feb 16 07:18:22 EST 2021
Compiletime test update
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -688,7 +688,17 @@
#if COMPILETIME_TINYGL_COMPAT_TEST == 1
-//NO
+//Test to ensure that these types are the correct size
+//If you get an "array is negative" error, simply change
+//the typedefs above to types which match the sizes tested for here.
+//Note that this library NEEDS a 4-byte float type (IEEE 754) so
+//if you don't have one, TinyGL is incompatible.
+
+//Sizeof cannot be tested directly in #if directives.
+//This won't work:
+//#if (sizeof(GLbyte) != 1)
+//#error "GLbyte is wrong size!"
+//#endif
extern char TGL_BUILDT_GLbyte[ 1-2*(sizeof(GLbyte) != 1)];
//extern char __BUILDT_error[ 1-2*(sizeof(GLbyte) != 4)];
extern char TGL_BUILDT_GLshort[ 1-2*(sizeof(GLshort) != 2)];
--- a/include/zfeatures.h
+++ b/include/zfeatures.h
@@ -7,7 +7,7 @@
#define TGL_FEATURE_ARRAYS 1
#define TGL_FEATURE_DISPLAYLISTS 1
//NOTE: Polygon Offset does nothing at the moment.
-#define TGL_FEATURE_POLYGON_OFFSET 1
+#define TGL_FEATURE_POLYGON_OFFSET 0
#define TGL_FEATURE_POLYGON_STIPPLE 0
//A stipple pattern is 128 bytes in size.
#define TGL_POLYGON_STIPPLE_BYTES 128
--- a/src/config.mk
+++ b/src/config.mk
@@ -3,7 +3,7 @@
# linux
CC= gcc
-CFLAGS= -Wall -O3 -g -std=c99
+CFLAGS= -Wall -O3 -g -std=c99 -Wno-undef
LFLAGS=
# for BeOS PPC