put tinygl internals into namespace, left only api

This commit is contained in:
Pawel Kolodziejski 2009-05-25 13:19:29 +00:00
parent 7ad12a0856
commit 49b578ec6a
28 changed files with 367 additions and 285 deletions

View file

@ -1,18 +1,20 @@
#include "graphics/tinygl/zgl.h"
void glopClearColor(GLContext *c, TGLParam *p) {
namespace TinyGL {
void glopClearColor(GLContext *c, GLParam *p) {
c->clear_color.v[0] = p[1].f;
c->clear_color.v[1] = p[2].f;
c->clear_color.v[2] = p[3].f;
c->clear_color.v[3] = p[4].f;
}
void glopClearDepth(GLContext *c, TGLParam *p) {
void glopClearDepth(GLContext *c, GLParam *p) {
c->clear_depth = p[1].f;
}
void glopClear(GLContext *c,TGLParam *p) {
void glopClear(GLContext *c,GLParam *p) {
int mask = p[1].i;
int z = 0;
int r = (int)(c->clear_color.v[0] * 65535);
@ -22,3 +24,5 @@ void glopClear(GLContext *c,TGLParam *p) {
// TODO : correct value of Z
ZB_clear(c->zb,mask & TGL_DEPTH_BUFFER_BIT, z, mask & TGL_COLOR_BUFFER_BIT, r, g, b);
}
} // end of namespace TinyGL