Add pakced depth stencil to GLFWView and HeadlessView
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user