From Thomas Hogarth, "Apple have decided in their eternal wisdom to do away with separate depth and stencil buffers on iOS from version 5 and above.
Attached are changes to GraphicsWindowIOS.mm to support setting up the new buffer type when compiling for iOS5, also attached is a small change to FrameBufferObject.cpp to report support for packed depth stencil via the GL_OES_packed_depth_stencil extension. For anyone reading this you can attach a packed depth stencil to your FBO like so _rttCamera->attach( osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, GL_DEPTH24_STENCIL8_EXT ); Luckily GL_DEPTH24_STENCIL8_EXT happens to have the same value as iOSs GL_DEPTH24_STENCIL8_OES"
This commit is contained in:
@@ -113,7 +113,8 @@ FBOExtensions::FBOExtensions(unsigned int contextID)
|
||||
LOAD_FBO_EXT(glRenderbufferStorageMultisampleCoverageNV);
|
||||
|
||||
_packed_depth_stencil_supported = OSG_GL3_FEATURES ||
|
||||
(isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil"));
|
||||
(isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil")) ||
|
||||
(isGLExtensionSupported(contextID, "GL_OES_packed_depth_stencil"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user