aboutsummaryrefslogtreecommitdiffstats
path: root/gl.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-04-27 20:56:00 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-04-27 20:56:00 +0100
commitbab0824608498d1079d4e9522f3014d3d538aabe (patch)
tree932f082b58fd48f85fbbdfa3f7419d2b3b03eedb /gl.h
parent3d73622dbd5a9ddc687fe6f42268c760695d7226 (diff)
downloadfaqe-bab0824608498d1079d4e9522f3014d3d538aabe.tar.gz
faqe-bab0824608498d1079d4e9522f3014d3d538aabe.tar.xz
faqe-bab0824608498d1079d4e9522f3014d3d538aabe.zip
Implement basic model loading of FMD format.
The FMD (Faqe Model Data) format is a format designed for faqe. It stores vertex, element and material information and mesh information. This patch provides the basic implementation and use of this format. This patch also implements perspective projection, depth testing and view and model matrices. An example fmd file is provided.
Diffstat (limited to 'gl.h')
-rw-r--r--gl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gl.h b/gl.h
index 30e7862..112fc82 100644
--- a/gl.h
+++ b/gl.h
@@ -32,6 +32,11 @@ typedef double GLdouble;
typedef double GLclampd;
enum {
+ GL_DEPTH_BUFFER_BIT = 0x100,
+ GL_COLOR_BUFFER_BIT = 0x4000,
+};
+
+enum {
GL_NO_ERROR = 0,
GL_FALSE = 0,
GL_TRUE = 1,
@@ -45,10 +50,10 @@ enum {
GL_OUT_OF_MEMORY = 0x0505,
GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506,
GL_CONTEXT_LOST = 0x0507,
+ GL_DEPTH_TEST = 0x0b71,
GL_UNSIGNED_INT = 0x1405,
GL_FLOAT = 0x1406,
GL_LINE = 0x1B01,
- GL_COLOR_BUFFER_BIT = 0x4000,
GL_ARRAY_BUFFER = 0x8892,
GL_ELEMENT_ARRAY_BUFFER = 0x8893,
GL_STREAM_DRAW = 0x88e0,