mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-25 01:23:52 +00:00
Implement Singlepass Terrain Render
This commit is contained in:
parent
49a8c0ad36
commit
87dd7ffc4a
35 changed files with 1658 additions and 951 deletions
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "platform/platform.h"
|
||||
#include "gfx/gl/gfxGLDevice.h"
|
||||
|
||||
#include "gfxGLTextureArray.h"
|
||||
#include "platform/platformGL.h"
|
||||
|
||||
#include "gfx/gfxCubemap.h"
|
||||
|
|
@ -457,6 +459,13 @@ GFXCubemapArray *GFXGLDevice::createCubemapArray()
|
|||
return cubeArray;
|
||||
}
|
||||
|
||||
GFXTextureArray* GFXGLDevice::createTextureArray()
|
||||
{
|
||||
GFXGLTextureArray* textureArray = new GFXGLTextureArray();
|
||||
textureArray->registerResourceWithDevice(this);
|
||||
return textureArray;
|
||||
}
|
||||
|
||||
void GFXGLDevice::endSceneInternal()
|
||||
{
|
||||
// nothing to do for opengl
|
||||
|
|
@ -766,6 +775,22 @@ void GFXGLDevice::setCubemapArrayInternal(U32 textureUnit, const GFXGLCubemapArr
|
|||
}
|
||||
}
|
||||
|
||||
void GFXGLDevice::setTextureArrayInternal(U32 textureUnit, const GFXGLTextureArray* texture)
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
mActiveTextureType[textureUnit] = GL_TEXTURE_2D_ARRAY;
|
||||
texture->bind(textureUnit);
|
||||
}
|
||||
else if (mActiveTextureType[textureUnit] != GL_ZERO)
|
||||
{
|
||||
glActiveTexture(GL_TEXTURE0 + textureUnit);
|
||||
glBindTexture(mActiveTextureType[textureUnit], 0);
|
||||
getOpenglCache()->setCacheBindedTex(textureUnit, mActiveTextureType[textureUnit], 0);
|
||||
mActiveTextureType[textureUnit] = GL_ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
void GFXGLDevice::setMatrix( GFXMatrixType mtype, const MatrixF &mat )
|
||||
{
|
||||
// ONLY NEEDED ON FFP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue