mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-25 22:35:37 +00:00
Implement Singlepass Terrain Render
This commit is contained in:
parent
49a8c0ad36
commit
87dd7ffc4a
35 changed files with 1658 additions and 951 deletions
|
|
@ -20,11 +20,11 @@ public:
|
|||
class TextureUnit
|
||||
{
|
||||
public:
|
||||
TextureUnit() : mTexture1D(0), mTexture2D(0), mTexture3D(0), mTextureCube(0), mTextureCubeArray(0)
|
||||
TextureUnit() : mTexture1D(0), mTexture2D(0), mTexture3D(0), mTextureCube(0), mTextureCubeArray(0), mTextureArray(0)
|
||||
{
|
||||
|
||||
}
|
||||
GLuint mTexture1D, mTexture2D, mTexture3D, mTextureCube, mTextureCubeArray;
|
||||
GLuint mTexture1D, mTexture2D, mTexture3D, mTextureCube, mTextureCubeArray, mTextureArray;
|
||||
};
|
||||
|
||||
/// after glBindTexture
|
||||
|
|
@ -48,6 +48,9 @@ public:
|
|||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureCubeArray = handle;
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureArray = handle;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0, avar("GFXGLStateCache::setCacheBindedTex - binding (%x) not supported.", biding) );
|
||||
return;
|
||||
|
|
@ -74,6 +77,9 @@ public:
|
|||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureCubeArray = handle;
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureArray = handle;
|
||||
break;
|
||||
case GL_FRAMEBUFFER:
|
||||
mBindedFBO_W = mBindedFBO_R = handle;
|
||||
break;
|
||||
|
|
@ -109,6 +115,8 @@ public:
|
|||
return mTextureUnits[mActiveTexture].mTextureCube;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
return mTextureUnits[mActiveTexture].mTextureCubeArray;
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
return mTextureUnits[mActiveTexture].mTextureArray;
|
||||
case GL_DRAW_FRAMEBUFFER:
|
||||
return mBindedFBO_W;
|
||||
case GL_READ_FRAMEBUFFER:
|
||||
|
|
@ -138,4 +146,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue