I have been trying to get this work but either get black screen or reporting error when using XCode to analyze the GL code like below. Any help appreciated. I am using Swift here if that making a difference. Any help appreciated.
The code I used to attach a stencil buffer is like below:
var depthRenderbuffer: GLuint = 0 glGenRenderbuffers(1, &depthRenderbuffer) glBindRenderbuffer(GLenum(GL_RENDERBUFFER), depthRenderbuffer) glRenderbufferStorage(GLenum(GL_RENDERBUFFER), GLenum(GL_DEPTH24_STENCIL8), 2208, 1242) glFramebufferRenderbuffer(GLenum(GL_FRAMEBUFFER), GLenum(GL_STENCIL_ATTACHMENT), GLenum(GL_RENDERBUFFER), depthRenderbuffer)