diff options
Diffstat (limited to 'source/modules/asura-core/graphics/texture.cpp')
-rw-r--r-- | source/modules/asura-core/graphics/texture.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/modules/asura-core/graphics/texture.cpp b/source/modules/asura-core/graphics/texture.cpp index c260ce9..4db6ad3 100644 --- a/source/modules/asura-core/graphics/texture.cpp +++ b/source/modules/asura-core/graphics/texture.cpp @@ -22,5 +22,24 @@ namespace AsuraEngine return mTex; } + TextureFormat Texture::ConvertColorFormat(const ColorFormat& colorformat) + { + TextureFormat t; + switch (colorformat) + { + case COLOR_FORMAT_RGBA8: + t.internalformat = GL_RGBA8; + t.externalformat = GL_RGBA; + t.type = GL_UNSIGNED_BYTE; + break; + case COLOR_FORMAT_RGBA32F: + t.internalformat = GL_RGBA32F; + t.externalformat = GL_RGBA; + t.type = GL_FLOAT; + break; + } + return t; + } + } }
\ No newline at end of file |