Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef GL_H
- #define GL_H
- #include <stdint.h>
- /* using gsVBO for now */
- #include "gs.h"
- typedef size_t GLuint;
- typedef int16_t GLint;
- typedef uint8_t GLubyte;
- typedef int GLboolean;
- typedef uint16_t GLenum;
- typedef int32_t GLsizei;
- enum GLbooleanValue
- {
- GL_FALSE = 0,
- GL_TRUE = 1,
- };
- enum GLblendMode
- {
- GL_FUNC_ADD = 0,
- GL_FUNC_SUBTRACT = 1,
- GL_FUNC_REVERSE_SUBTRACT = 2,
- GL_MIN = 3,
- GL_MAX = 4,
- };
- enum GLblendFactor
- {
- GL_ZERO = 0,
- GL_ONE = 1,
- GL_SRC_COLOR = 2,
- GL_ONE_MINUS_SRC_COLOR = 3,
- GL_DST_COLOR = 4,
- GL_ONE_MINUS_DST_COLOR = 5,
- GL_SRC_ALPHA = 6,
- GL_ONE_MINUS_SRC_ALPHA = 7,
- GL_DST_ALPHA = 8,
- GL_ONE_MINUS_DST_ALPHA = 9,
- GL_CONSTANT_COLOR = 10,
- GL_ONE_MINUS_CONSTANT_COLOR = 11,
- GL_CONSTANT_ALPHA = 12,
- GL_ONE_MINUS_CONSTANT_ALPHA = 13,
- GL_SRC_ALPHA_SATURATE = 14,
- };
- enum GLcaps
- {
- GL_CULL_FACE = 0x0001,
- GL_STENCIL_TEST = 0x0002,
- GL_BLEND = 0x0004,
- GL_ALPHA_TEST = 0x0008,
- GL_DEPTH_TEST = 0x0010,
- };
- enum GLcullFaceMode
- {
- GL_FRONT = 0,
- GL_BACK = 1,
- /*GL_FRONT_AND_BACK -- not supported?*/
- };
- enum GLfrontFaceMode
- {
- GL_CW = 0,
- GL_CCW = 1,
- };
- enum GLstencilOp
- {
- GL_KEEP = 0,
- GL_AND_NOT = 1,
- GL_XOR = 5,
- };
- enum GLtestFunc
- {
- GL_NEVER = 0,
- GL_ALWAYS = 1,
- GL_EQUAL = 2,
- GL_NOTEQUAL = 3,
- GL_LESS = 4,
- GL_LEQUAL = 5,
- GL_GREATER = 6,
- GL_GEQUAL = 7,
- };
- //
- void ctrglInit();
- void ctrglBeginRendering();
- void ctrglFlushState();
- /* **** STATE **** */
- void glEnable(GLenum cap);
- /* Alpha Test */
- void glAlphaFunc(GLenum func, GLclampf ref);
- void glAlphaFuncubCTR(GLenum func, GLubyte ref);
- /* Blending */
- void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
- void glBlendColor4ubCTR(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
- /* Culling */
- void glCullFace(GLenum mode);
- void glFrontFace(GLenum mode);
- /* Depth Test */
- void glDepthFunc(GLenum func);
- void glDepthMask(GLboolean flag);
- /* Stencil */
- void glStencilFunc(GLenum func, GLint ref, GLuint mask);
- void glStencilOp(GLenum sfail, GLenum dpfail, GLenum dppass);
- /* **** TEXTURES **** */
- void glGenTextures(GLsizei n, GLuint* textures);
- /* **** SHADERS **** */
- GLuint glCreateProgram(void);
- /* temporary */
- void glDrawVbo(gsVbo_s* vbo);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment