diff options
author | knolax <1339802534.kk@gmail.com> | 2017-02-23 10:31:44 -0500 |
---|---|---|
committer | knolax <1339802534.kk@gmail.com> | 2017-02-23 10:31:44 -0500 |
commit | 0c2c626fbdfd7836f086eb8f4039a394368b7974 (patch) | |
tree | 7612f66694d0c3efb2837e05ba498fea296957f5 /glgfx.cpp | |
parent | c7bdd6fcae58e09597071405c1449df64e084c51 (diff) |
implemented depth testing and disabled blending for now
Diffstat (limited to 'glgfx.cpp')
-rw-r--r-- | glgfx.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; +} |