From dff3a3bb342327b4a01d380a202e35c2ab91e0a7 Mon Sep 17 00:00:00 2001 From: samcake Date: Tue, 25 Apr 2017 11:34:01 -0700 Subject: [PATCH 1/2] fixing the mac crash --- libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp index fe01284446..da52610299 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp @@ -70,8 +70,9 @@ GL41Texture::GL41Texture(const std::weak_ptr& 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); + // glCreateTextures(getGLTextureType(texture), 1, &result); + // glCreateTextures(getGLTextureType(texture), 1, &result); + glGenTextures(1, &result); return result; } @@ -280,7 +281,7 @@ void GL41VariableAllocationTexture::promote() { withPreservedTexture([&] { GLuint fbo { 0 }; - glCreateFramebuffers(1, &fbo); + glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo); uint16_t mips = _gpuObject.getNumMips(); From fe7cec1734b6d112e548cf91b292436c71cd6e75 Mon Sep 17 00:00:00 2001 From: samcake Date: Tue, 25 Apr 2017 12:04:12 -0700 Subject: [PATCH 2/2] Testing on windows running 4.1 backend, all good --- libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp index da52610299..e2e1b164cf 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp @@ -69,9 +69,6 @@ GL41Texture::GL41Texture(const std::weak_ptr& 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); - // glCreateTextures(getGLTextureType(texture), 1, &result); glGenTextures(1, &result); return result; }