ref: 8b60b91ae4d6187e1784d43476e34c5cf056f6c8
parent: 1184569de9ddfbe78aae169ee3a5faf13edff9a0
author: David <gek@katherine>
date: Wed Mar 3 13:05:17 EST 2021
RAW DEMOSgit add .!
--- a/README.md
+++ b/README.md
@@ -18,6 +18,20 @@
TinyGL is written in pure C99, and requires very few functions from the C standard library, it doesn't even require malloc and free
(The calls are aliased to gl_malloc() and gl_free(), which you can replace with your own memory management model if you desire)
+You can test compiling TinyGL and running it on platforms without SDL by running the RAW DEMOS, which do not require ANYTHING
+Except the C standard library and stdio. You may have to change the destination written to by the raw demos on platforms
+without standard file systems.
+
+These are the C standard library includes used in the RAW DEMOS.
+
+```c
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+```
+
If you are unsure if your target platform can support TinyGL, compile it with the buildtime and runtime tests enabled (They are, by default)
if you get a TGL_BUILDT error, then you've failed the buildtime test.
@@ -26,8 +40,7 @@
The SDL examples have been tested building on Debian 10 and Windows 10, while tinygl itself has been confirmed to compile on many more platforms.
-### You can test compiling TinyGL and running it on platforms without SDL by running the RAW DEMOS, which do not require ANYTHING
-### Except the C standard library.
+
Without Polygon Stipple:
--- a/Raw_Demos/gears.c
+++ b/Raw_Demos/gears.c
@@ -7,17 +7,37 @@
//#define PLAY_MUSIC
+//Only C standard library includes.
+//These are ALL the external dependencies of this program!!! ALL of them!!!
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
+
+//Doesn't drag in anything.
#include "../include/GL/gl.h"
+//Doesn't drag in anything.
#include "../include/zbuffer.h"
#define CHAD_MATH_IMPL
+
+//Drags in Math and String (which are already dragged in above.)
#include "include/3dMath.h"
+//Requires
+/*
+#include <math.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+and
+#include <assert.h>
+if I didn't define STBIW_ASSERT
+*/
+#define STBIW_ASSERT(x) /* a comment */
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "include/stb_image_write.h"
--- a/include/zfeatures.h
+++ b/include/zfeatures.h
@@ -73,8 +73,8 @@
#define TGL_FEATURE_24_BITS 0
//These are the only maintained modes.
-#define TGL_FEATURE_16_BITS 1
-#define TGL_FEATURE_32_BITS 0
+#define TGL_FEATURE_16_BITS 0
+#define TGL_FEATURE_32_BITS 1
//#define TGL_FEATURE_RENDER_BITS 15
//#define TGL_FEATURE_RENDER_BITS 16