first render
[nexus3d] / src / gfx.h
index 5faf474..61eac33 100644 (file)
--- a/src/gfx.h
+++ b/src/gfx.h
@@ -3,10 +3,11 @@
 
 #include <stddef.h>
 
-enum nex_state_flags {
-       NEX_DEPTH_TEST          = 0x0001,
-       NEX_STENCIL_TEST        = 0x0002,
-       NEX_BLEND                       = 0x0004,
+enum nex_state_opt {
+       NEX_DEPTH_TEST,
+       NEX_STENCIL_TEST,
+       NEX_BLEND,
+       NEX_CULL_FACE
 };
 
 enum nex_vattr_type {
@@ -41,6 +42,10 @@ void nex_clearstencil(unsigned int s);
 
 void nex_viewport(int x, int y, int w, int h);
 
+void nex_enable(enum nex_state_opt opt);
+void nex_disable(enum nex_state_opt opt);
+int nex_is_enabled(enum nex_state_opt opt);
+
 /* --- buffers and geometry --- */
 nex_buffer *nex_alloc_buffer(size_t sz, const void *data);
 void nex_free_buffer(nex_buffer *buf);
@@ -74,6 +79,10 @@ void nex_attach_shader(nex_sdrprog *prog, nex_shader *sdr);
 int nex_build_sdrprog(nex_sdrprog *prog);
 void nex_bind_sdrprog(nex_sdrprog *prog);
 
+int nex_find_uniform(nex_sdrprog *prog, const char *name);
+void nex_uniform_mat4(nex_sdrprog *prog, int loc, const float *mat);
+void nex_uniform_mat4_name(nex_sdrprog *prog, const char *name, const float *mat);
+
 nex_shader *nex_load_shader(const char *path, enum nex_sdr_type type);
 nex_sdrprog *nex_load_sdrprog(const char *vpath, const char *ppath);