1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Merge pull request #601 from TomHarte/8ppStencil

Switches to an 8bpp stencil, for Nvidia compatibility.
This commit is contained in:
Thomas Harte 2019-03-03 20:39:50 -05:00 committed by GitHub
commit 8915950c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ TextureTarget::TextureTarget(GLsizei width, GLsizei height, GLenum texture_unit,
if(has_stencil_buffer) {
test_gl(glGenRenderbuffers, 1, &renderbuffer_);
test_gl(glBindRenderbuffer, GL_RENDERBUFFER, renderbuffer_);
test_gl(glRenderbufferStorage, GL_RENDERBUFFER, GL_STENCIL_INDEX1, expanded_width_, expanded_height_);
test_gl(glRenderbufferStorage, GL_RENDERBUFFER, GL_STENCIL_INDEX8, expanded_width_, expanded_height_);
test_gl(glFramebufferRenderbuffer, GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, renderbuffer_);
}

View File

@ -33,7 +33,7 @@ class TextureTarget {
@param width The width of target to create.
@param height The height of target to create.
@param texture_unit A texture unit on which to bind the texture.
@param has_stencil_buffer A 1-bit stencil buffer is attached if this is @c true; no stencil buffer is attached otherwise.
@param has_stencil_buffer An 8-bit stencil buffer is attached if this is @c true; no stencil buffer is attached otherwise.
*/
TextureTarget(GLsizei width, GLsizei height, GLenum texture_unit, GLint mag_filter, bool has_stencil_buffer);
~TextureTarget();