mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Implement support for array textures in GL driver
note: feature detection was not implemented in the legacy driver, but the code itself probably works.
This commit is contained in:
parent
d5bf094f9a
commit
46db688cc8
14 changed files with 111 additions and 72 deletions
|
@ -267,6 +267,7 @@ bool COpenGL3DriverBase::genericDriverInit(const core::dimension2d<u32> &screenS
|
|||
DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy);
|
||||
DriverAttributes->setAttribute("MaxIndices", (s32)MaxIndices);
|
||||
DriverAttributes->setAttribute("MaxTextureSize", (s32)MaxTextureSize);
|
||||
DriverAttributes->setAttribute("MaxArrayTextureLayers", (s32)MaxArrayTextureLayers);
|
||||
DriverAttributes->setAttribute("MaxTextureLODBias", MaxTextureLODBias);
|
||||
DriverAttributes->setAttribute("Version", 100 * Version.Major + Version.Minor);
|
||||
DriverAttributes->setAttribute("AntiAlias", AntiAlias);
|
||||
|
@ -1072,20 +1073,9 @@ void COpenGL3DriverBase::endDraw(const VertexType &vertexType)
|
|||
GL.DisableVertexAttribArray(attr.Index);
|
||||
}
|
||||
|
||||
ITexture *COpenGL3DriverBase::createDeviceDependentTexture(const io::path &name, IImage *image)
|
||||
ITexture *COpenGL3DriverBase::createDeviceDependentTexture(const io::path &name, E_TEXTURE_TYPE type, const std::vector<IImage*> &images)
|
||||
{
|
||||
std::vector<IImage*> tmp { image };
|
||||
|
||||
COpenGL3Texture *texture = new COpenGL3Texture(name, tmp, ETT_2D, this);
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
ITexture *COpenGL3DriverBase::createDeviceDependentTextureCubemap(const io::path &name, const std::vector<IImage*> &image)
|
||||
{
|
||||
COpenGL3Texture *texture = new COpenGL3Texture(name, image, ETT_CUBEMAP, this);
|
||||
|
||||
return texture;
|
||||
return new COpenGL3Texture(name, images, type, this);
|
||||
}
|
||||
|
||||
// Same as COpenGLDriver::TextureFlipMatrix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue