summaryrefslogtreecommitdiff
path: root/glgfx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'glgfx.cpp')
-rw-r--r--glgfx.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/glgfx.cpp b/glgfx.cpp
index 4dd25ec..9393d66 100644
--- a/glgfx.cpp
+++ b/glgfx.cpp
@@ -28,13 +28,15 @@ int initglgfx() {
//for you
glewExperimental = GL_TRUE;
glewInit();
- glEnable (GL_BLEND);
+ //glEnable (GL_BLEND);
// so we can have transparent polygons
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ //glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
//culls back face triagnles, which is determined by whether vertexes are clockwise
// or counterclockwise
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LEQUAL);
GLuint glnum;
glGenBuffers(1, &glnum);
printf("%u\n",glnum);
@@ -251,3 +253,7 @@ int drawmodel(float x, float y, float z, float xr, float yr, float zr) {
}
int quitglgfx() {
}
+int clearglgfx() {
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ return 0;
+}