Merge pull request #10280 from samcake/white

Fixing the crash on mac at start up
This commit is contained in:
Sam Gateau 2017-04-25 14:32:23 -07:00 committed by GitHub
commit 59ed51c702

View file

@ -69,9 +69,7 @@ GL41Texture::GL41Texture(const std::weak_ptr<GLBackend>& backend, const Texture&
GLuint GL41Texture::allocate(const Texture& texture) {
GLuint result;
// FIXME technically GL 4.2, but OSX includes the ARB_texture_storage extension
glCreateTextures(getGLTextureType(texture), 1, &result);
//glGenTextures(1, &result);
glGenTextures(1, &result);
return result;
}
@ -280,7 +278,7 @@ void GL41VariableAllocationTexture::promote() {
withPreservedTexture([&] {
GLuint fbo { 0 };
glCreateFramebuffers(1, &fbo);
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
uint16_t mips = _gpuObject.getNumMips();