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:
commit
8915950c7d
@ -44,7 +44,7 @@ TextureTarget::TextureTarget(GLsizei width, GLsizei height, GLenum texture_unit,
|
|||||||
if(has_stencil_buffer) {
|
if(has_stencil_buffer) {
|
||||||
test_gl(glGenRenderbuffers, 1, &renderbuffer_);
|
test_gl(glGenRenderbuffers, 1, &renderbuffer_);
|
||||||
test_gl(glBindRenderbuffer, GL_RENDERBUFFER, 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_);
|
test_gl(glFramebufferRenderbuffer, GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, renderbuffer_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class TextureTarget {
|
|||||||
@param width The width of target to create.
|
@param width The width of target to create.
|
||||||
@param height The height 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 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(GLsizei width, GLsizei height, GLenum texture_unit, GLint mag_filter, bool has_stencil_buffer);
|
||||||
~TextureTarget();
|
~TextureTarget();
|
||||||
|
Loading…
Reference in New Issue
Block a user