This commit is contained in:
Areloch 2019-04-15 23:11:18 -05:00
parent c025760422
commit 000c7b2263
21 changed files with 4102 additions and 108 deletions

View file

@ -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