diff --git a/Engine/source/gfx/gl/gfxGLTextureManager.cpp b/Engine/source/gfx/gl/gfxGLTextureManager.cpp index 70a5e4303..3b5ff0294 100644 --- a/Engine/source/gfx/gl/gfxGLTextureManager.cpp +++ b/Engine/source/gfx/gl/gfxGLTextureManager.cpp @@ -228,20 +228,20 @@ void GFXGLTextureManager::innerCreateTexture( GFXGLTextureObject *retTex, static void _fastTextureLoad(GFXGLTextureObject* texture, GBitmap* pDL) { - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, texture->getBuffer()); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, texture->getBuffer()); U32 bufSize = pDL->getWidth(0) * pDL->getHeight(0) * pDL->getBytesPerPixel(); - glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB, bufSize, NULL, GL_STREAM_DRAW); + glBufferData(GL_PIXEL_UNPACK_BUFFER, bufSize, NULL, GL_STREAM_DRAW); if(pDL->getFormat() == GFXFormatR8G8B8A8 || pDL->getFormat() == GFXFormatR8G8B8X8) { FrameAllocatorMarker mem; U8* pboMemory = (U8*)mem.alloc(bufSize); GFX->getDeviceSwizzle32()->ToBuffer(pboMemory, pDL->getBits(0), bufSize); - glBufferSubData(GL_PIXEL_UNPACK_BUFFER_ARB, 0, bufSize, pboMemory ); + glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, bufSize, pboMemory ); } else { - glBufferSubData(GL_PIXEL_UNPACK_BUFFER_ARB, 0, bufSize, pDL->getBits(0) ); + glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, bufSize, pDL->getBits(0) ); } if(texture->getBinding() == GL_TEXTURE_2D) @@ -249,7 +249,7 @@ static void _fastTextureLoad(GFXGLTextureObject* texture, GBitmap* pDL) else glTexSubImage1D(texture->getBinding(), 0, 0, (pDL->getWidth(0) > 1 ? pDL->getWidth(0) : pDL->getHeight(0)), GFXGLTextureFormat[pDL->getFormat()], GFXGLTextureType[pDL->getFormat()], NULL); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); } static void _slowTextureLoad(GFXGLTextureObject* texture, GBitmap* pDL) diff --git a/Engine/source/gfx/gl/gfxGLTextureObject.cpp b/Engine/source/gfx/gl/gfxGLTextureObject.cpp index ed229e5d9..0f76b9a18 100644 --- a/Engine/source/gfx/gl/gfxGLTextureObject.cpp +++ b/Engine/source/gfx/gl/gfxGLTextureObject.cpp @@ -98,8 +98,8 @@ void GFXGLTextureObject::unlock(U32 mipLevel) PRESERVE_TEXTURE(mBinding); glBindTexture(mBinding, mHandle); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, mBuffer); - glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB, (mLockedRectRect.extent.x + 1) * (mLockedRectRect.extent.y + 1) * mBytesPerTexel, mFrameAllocatorPtr, GL_STREAM_DRAW); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, mBuffer); + glBufferData(GL_PIXEL_UNPACK_BUFFER, (mLockedRectRect.extent.x + 1) * (mLockedRectRect.extent.y + 1) * mBytesPerTexel, mFrameAllocatorPtr, GL_STREAM_DRAW); if(mBinding == GL_TEXTURE_2D) glTexSubImage2D(mBinding, mipLevel, mLockedRectRect.point.x, mLockedRectRect.point.y, @@ -108,7 +108,7 @@ void GFXGLTextureObject::unlock(U32 mipLevel) glTexSubImage1D(mBinding, mipLevel, (mLockedRectRect.point.x > 1 ? mLockedRectRect.point.x : mLockedRectRect.point.y), (mLockedRectRect.extent.x > 1 ? mLockedRectRect.extent.x : mLockedRectRect.extent.y), GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], NULL); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); mLockedRect.bits = NULL; #if TORQUE_DEBUG