Commit 6284ce91 authored by Frédéric Larue's avatar Frédéric Larue

Code cleaning in the Texture2DArray class.

parent 652c4c68
......@@ -46,10 +46,6 @@ bool GPU::Texture2DArray::Create( GLenum internalFormats[],
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
const GLvoid* data,
GLsizei nMipMaps )
{
if( !Instantiate() )
......@@ -98,21 +94,6 @@ bool GPU::Texture2DArray::Create( GLenum internalFormats[],
}
} while( !isSupported );
GLint validatedFormat;
GLint validatedType;
if( format == GL_NONE )
glGetInternalformativ( m_Target, internalFormats[currentFormatId], GL_TEXTURE_IMAGE_FORMAT, 1, &validatedFormat );
else
validatedFormat = (GLint) format;
if( type == GL_NONE )
glGetInternalformativ( m_Target, internalFormats[currentFormatId], GL_TEXTURE_IMAGE_TYPE , 1, &validatedType );
else
validatedType = (GLint) type;
glTexStorage3D(
m_Target,
nMipMaps,
......
......@@ -57,46 +57,12 @@ namespace GPU
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
const GLvoid* data,
GLsizei nMipMaps = 1 ) { GLenum f[] = {internalFormat,GL_NONE}; return Create(f,width,height,depth,border,format,type,data,nMipMaps); }
GLsizei nMipMaps = 1 ) { GLenum f[] = {internalFormat,GL_NONE}; return Create(f,width,height,depth,nMipMaps); }
bool Create( GLenum internalFormats[],
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
const GLvoid* data,
GLsizei nMipMaps = 1 );
inline bool Create( GLenum internalFormat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
const GLvoid* data,
GLsizei nMipMaps = 1 ) { return Create(internalFormat,width,height,depth,0,format,type,data,nMipMaps); }
inline bool Create( GLenum internalFormats[],
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
const GLvoid* data,
GLsizei nMipMaps = 1 ) { return Create(internalFormats,width,height,depth,0,format,type,data,nMipMaps); }
inline bool Create( GLenum internalFormat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLsizei nMipMaps = 1 ) { return Create(internalFormat,width,height,depth,0,GL_RGB,GL_INT,NULL,nMipMaps); }
inline bool Create( GLenum internalFormats[],
GLsizei width,
GLsizei height,
GLsizei depth,
GLsizei nMipMaps = 1 ) { return Create(internalFormats,width,height,depth,0,GL_RGB,GL_INT,NULL,nMipMaps); };
bool LoadSlice( GLsizei sliceDepth,
GLenum format,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment