Skip to content
Snippets Groups Projects
Commit ee341708 authored by Janis Born's avatar Janis Born
Browse files

loadTexture2D now also loads DDS files based on file ending

parent f1e32bf8
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
**********************************************************************/
#include <ACGL/OpenGL/Data/TextureLoadStore.hh>
#include <ACGL/Base/FileHelpers.hh>
using namespace ACGL;
using namespace ACGL::OpenGL;
......@@ -14,6 +15,13 @@ namespace ACGL{
namespace OpenGL{
SharedTexture2D loadTexture2D( const std::string &_filename )
{
std::string fileEnding = Base::FileHelpers::getFileEnding(_filename);
if(fileEnding == "dds")
{
return loadTexture2DFromDDS(_filename);
}
else
{
SharedTexture2D texture = SharedTexture2D( new Texture2D() );
SharedTextureData data = loadTextureData( _filename );
......@@ -27,6 +35,7 @@ SharedTexture2D loadTexture2D( const std::string &_filename )
return texture;
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment