mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-08 14:05:19 +00:00
Merge branch 'development-gg' into glpboimprovement
Conflicts: Engine/source/gfx/gl/gfxGLTextureManager.cpp
This commit is contained in:
commit
e43a0ba6e9
211 changed files with 18371 additions and 2429 deletions
|
|
@ -96,6 +96,9 @@ void GFXGLTextureObject::unlock(U32 mipLevel)
|
|||
if(!mLockedRect.bits)
|
||||
return;
|
||||
|
||||
// I know this is in unlock, but in GL we actually do our submission in unlock.
|
||||
PROFILE_SCOPE(GFXGLTextureObject_lockRT);
|
||||
|
||||
PRESERVE_TEXTURE(mBinding);
|
||||
glBindTexture(mBinding, mHandle);
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, mBuffer);
|
||||
|
|
@ -175,6 +178,7 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp)
|
|||
|
||||
glGetTexImage(mBinding, 0, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], orig);
|
||||
|
||||
PROFILE_START(GFXGLTextureObject_copyToBmp_pixCopy);
|
||||
for(int i = 0; i < srcPixelCount; ++i)
|
||||
{
|
||||
dest[0] = orig[0];
|
||||
|
|
@ -186,6 +190,7 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp)
|
|||
orig += srcBytesPerPixel;
|
||||
dest += dstBytesPerPixel;
|
||||
}
|
||||
PROFILE_END();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -211,7 +216,7 @@ void GFXGLTextureObject::bind(U32 textureUnit)
|
|||
glBindTexture(mBinding, mHandle);
|
||||
GFXGL->getOpenglCache()->setCacheBindedTex(textureUnit, mBinding, mHandle);
|
||||
|
||||
if( gglHasExtension(ARB_sampler_objects) )
|
||||
if(GFXGL->mCapabilities.samplerObjects)
|
||||
return;
|
||||
|
||||
GFXGLStateBlockRef sb = mGLDevice->getCurrentStateBlock();
|
||||
|
|
@ -298,8 +303,8 @@ void GFXGLTextureObject::reloadFromCache()
|
|||
else if(mBinding == GL_TEXTURE_1D)
|
||||
glTexSubImage1D(mBinding, 0, 0, (mTextureSize.x > 1 ? mTextureSize.x : mTextureSize.y), GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], mZombieCache);
|
||||
|
||||
if(GFX->getCardProfiler()->queryProfile("GL::Workaround::needsExplicitGenerateMipmap") && mMipLevels != 1)
|
||||
glGenerateMipmapEXT(mBinding);
|
||||
if(mMipLevels != 1)
|
||||
glGenerateMipmap(mBinding);
|
||||
|
||||
delete[] mZombieCache;
|
||||
mZombieCache = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue