diff options
-rwxr-xr-x | example/main | bin | 49488 -> 49568 bytes | |||
-rw-r--r-- | example/main.cpp | 1 | ||||
-rw-r--r-- | example/main.o | bin | 4752 -> 4824 bytes | |||
-rw-r--r-- | glgfx.cpp | 10 | ||||
-rw-r--r-- | glgfx.h | 1 | ||||
-rw-r--r-- | glgfx.o | bin | 57920 -> 58104 bytes | |||
-rw-r--r-- | libglgfx.a | bin | 62084 -> 62288 bytes |
7 files changed, 10 insertions, 2 deletions
diff --git a/example/main b/example/main Binary files differindex e4895a1..51bb73a 100755 --- a/example/main +++ b/example/main diff --git a/example/main.cpp b/example/main.cpp index 05777a4..d71322b 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -17,6 +17,7 @@ int main (int argc, char * argv[]) { loop = 1; while(loop) { cleargfx(); + clearglgfx(); //polls events, which are in a buffer //returns 1 if there is event in buffer //returns 0 if buffer is empty diff --git a/example/main.o b/example/main.o Binary files differindex 37c8220..adf6955 100644 --- a/example/main.o +++ b/example/main.o @@ -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; +} @@ -14,5 +14,6 @@ int drawmodel(float x, float y, float z, float xr, float yr, float zr); int setcam (float cpx, float cpy, float cpz, float clx, float cly, float clz, float cux, float cuy, float cuz); int setlight (float x, float y, float z); int quitglgfx(); +int clearglgfx(); std::string readfile(const char *); #endif Binary files differBinary files differ |