mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
GL work
This commit is contained in:
parent
c025760422
commit
000c7b2263
21 changed files with 4102 additions and 108 deletions
|
|
@ -448,6 +448,13 @@ GFXCubemap* GFXGLDevice::createCubemap()
|
|||
return cube;
|
||||
};
|
||||
|
||||
GFXCubemapArray *GFXGLDevice::createCubemapArray()
|
||||
{
|
||||
GFXGLCubemapArray* cubeArray = new GFXGLCubemapArray();
|
||||
cubeArray->registerResourceWithDevice(this);
|
||||
return cubeArray;
|
||||
}
|
||||
|
||||
void GFXGLDevice::endSceneInternal()
|
||||
{
|
||||
// nothing to do for opengl
|
||||
|
|
@ -675,6 +682,22 @@ void GFXGLDevice::setCubemapInternal(U32 textureUnit, const GFXGLCubemap* textur
|
|||
}
|
||||
}
|
||||
|
||||
void GFXGLDevice::setCubemapArrayInternal(U32 textureUnit, const GFXGLCubemapArray* texture)
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
mActiveTextureType[textureUnit] = GL_TEXTURE_CUBE_MAP_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