Add pakced depth stencil to GLFWView and HeadlessView

This commit is contained in:
Leith Bade
2014-12-07 00:40:44 +11:00
parent b534520d6c
commit 886b622a92
3 changed files with 11 additions and 0 deletions

View File

@@ -130,9 +130,11 @@ extern PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays;
extern PFNGLGENVERTEXARRAYSPROC GenVertexArrays;
extern PFNGLISVERTEXARRAYPROC IsVertexArray;
// GL_EXT_packed_depth_stencil / GL_OES_packed_depth_stencil
extern bool isPackedDepthStencilSupported;
#define GL_DEPTH24_STENCIL8 0x88F0
// GL_OES_depth24
extern bool isDepth24Supported;
#define GL_DEPTH_COMPONENT24 0x81A6

View File

@@ -152,6 +152,10 @@ void GLFWView::initialize(mbgl::Map *map_) {
assert(gl::ProgramBinary != nullptr);
assert(gl::ProgramParameteri != nullptr);
}
// Require packed depth stencil
gl::isPackedDepthStencilSupported = true;
gl::isDepth24Supported = true;
}
glfwMakeContextCurrent(nullptr);

View File

@@ -85,6 +85,11 @@ void HeadlessView::loadExtensions() {
gl::IsVertexArray = (gl::PFNGLISVERTEXARRAYPROC)glXGetProcAddress((const GLubyte *)"glIsVertexArrayARB");
}
#endif
// HeadlessView requires packed depth stencil
gl::isPackedDepthStencilSupported = true;
gl::isDepth24Supported = true;
make_inactive();
}