ref: 18949a3f82797cdde959037b56781e1437b56176
parent: 5f6f06a16d4bfff12158c2792b822f55be071a21
author: David <gek@katherine>
date: Fri Feb 19 10:25:51 EST 2021
Removed license string by default
--- a/README.md
+++ b/README.md
@@ -148,6 +148,7 @@
* 32 bit binary float type (IEEE 754)
* Some floating point type at least as large as a 32 bit float
* sin and cos functions in math.h
+* memcpy
* assert in assert.h
* a minimal C stdlib
* A memory allocator of some sort with some equivalents or replacements for malloc, calloc, and free.
@@ -197,67 +198,7 @@
See `include/zfeatures.h`
-Standard OpenGL features that you can disable for extra performance or smaller binary size.
-
-Note that Polygon Stipple is OFF by default, to improve performance.
-
-Lit texturing is toggleable because it significantly bogs down the rendering of textured triangles even if there is no lighting.
-```c
-#define TGL_FEATURE_ARRAYS 1
-#define TGL_FEATURE_DISPLAYLISTS 1
-#define TGL_FEATURE_LIT_TEXTURES 1
-//NOTE: Polygon Offset does nothing at the moment.
-#define TGL_FEATURE_POLYGON_OFFSET 0
-#define TGL_FEATURE_POLYGON_STIPPLE 0
-#define TGL_FEATURE_BLEND 1
-```
-
-Change the dimensions of a polygon stipple pattern, and how it's interpreted.
-
-If you're only ever going to use very small stipple patterns, it's recommended you alter these settings.
-```c
-//A stipple pattern is 128 bytes in size.
-#define TGL_POLYGON_STIPPLE_BYTES 128
-//A stipple pattern is 2^5 (32) bits wide.
-#define TGL_POLYGON_STIPPLE_POW2_WIDTH 5
-//The stipple pattern mask (the last bits of the screen coordinates used for indexing)
-//The default pattern is 32 bits wide and 32 bits tall, or 4 bytes per row and 32 tall, 4 * 32 = 128 bytes.
-#define TGL_POLYGON_STIPPLE_MASK_X 31
-#define TGL_POLYGON_STIPPLE_MASK_Y 31
-```
-
-These features enable you to achieve the effect of `discard` in GLSL shaders.
-
-You can use this to draw objects which only ever need discard-type alpha transparency.
-
-Simply specify a color to use for that purpose. My favorite choice is hideous magenta (0xff00ff)
-
-The color mask is "and'd" with the color before the test, in case you wanted to only test one color (red, for instance)
-
-Note that when changing between bit depths, you will need to alter the NO_COPY_COLOR and NO_DRAW_COLOR if you use those
-features.
-```c
-#define TGL_FEATURE_NO_COPY_COLOR 0
-#define TGL_FEATURE_NO_DRAW_COLOR 0
-#define TGL_FEATURE_FORCE_CLEAR_NO_COPY_COLOR 0
-#define TGL_NO_COPY_COLOR 0xff00ff
-#define TGL_NO_DRAW_COLOR 0xff00ff
-//^ solid debug pink.
-#define TGL_COLOR_MASK 0x00ffffff
-```
-
-Alter the bit depth of rendering. Note that all textures loaded are assumed to be R8G8B8 (in that order, with no Alpha or padding)
-
-Textures are converted internally (see image_util.c) to the renderer's output format.
-
-at the current time, only 16 and 32 bit rendering are maintained and tested regularly.
-```c
-#define TGL_FEATURE_8_BITS 0
-#define TGL_FEATURE_24_BITS 0
-//These are the only maintained modes.
-#define TGL_FEATURE_16_BITS 0
-#define TGL_FEATURE_32_BITS 1
-```
+This changes too often to maintain documentation here.
## FIXED BUGS FROM THE ORIGINAL!
--- a/include/zfeatures.h
+++ b/include/zfeatures.h
@@ -4,10 +4,12 @@
/* It is possible to enable/disable (compile time) features in this
header file. */
-//Enables setting the error flags when there's an error, so you can check it with glGetError, should only be used in development builds.
+//Enables setting the error flags when there's an error, so you can check it with glGetError
+//Disabling this has slight performance gains.
#define TGL_FEATURE_ERROR_CHECK 1
//Strict out-of-memory checking. All OpenGL function calls are invalidated (ALL OF THEM) if a GL_OUT_OF_MEMORY error occurs.
-//This slows down the renderer so we don't usually do it.
+//This slows down the renderer so we don't usually do it, but
+//it's part of the GL spec.
#define TGL_FEATURE_STRICT_OOM_CHECKS 0
//Clientside Arrays
#define TGL_FEATURE_ARRAYS 1
--- a/src/get.c
+++ b/src/get.c
@@ -57,6 +57,7 @@
#define xstr(s) str(s)
#define str(s) #s
+/*
const GLubyte* license_string = (const GLubyte*)""
"Copyright notice:\n"
"\n"
@@ -80,8 +81,8 @@
"\n"
"If you redistribute modified sources, I would appreciate that you\n"
"include in the files history information documenting your changes.";
+*/
-
const GLubyte* vendor_string = (const GLubyte*)"Fabrice Bellard, Gek, and the C-Chads";
const GLubyte* renderer_string = (const GLubyte*)"TinyGL";
const GLubyte* version_string = (const GLubyte*)""
@@ -169,7 +170,7 @@
case GL_RENDERER: return renderer_string;
case GL_VERSION: return version_string;
case GL_EXTENSIONS: return extensions_string;
- case GL_LICENSE: return license_string;
+ /*case GL_LICENSE: return license_string;*/
}
return (const GLubyte*)"Erroneous input to glGetString";
}