Fix OpenGL stencil clear hack. Improve example stencil reflection

This commit is contained in:
Austin Eng
2017-05-30 19:26:05 -04:00
committed by Corentin Wallez
parent 76e64a985d
commit 084346bd5f
2 changed files with 14 additions and 5 deletions

View File

@@ -28,9 +28,9 @@ namespace opengl {
void HACKCLEAR() {
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glStencilMask(0xff);
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
void Init(void* (*getProc)(const char*), nxtProcTable* procs, nxtDevice* device) {