TextureLoadStore.hh 1.28 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/***********************************************************************
 * Copyright 2011-2012 Computer Graphics Group RWTH Aachen University. *
 * All rights reserved.                                                *
 * Distributed under the terms of the MIT License (see LICENSE.TXT).   *
 **********************************************************************/

#pragma once

/**
 * Helper function for writing the contents of a Texture object into a file
 * and loading them from a file.
 */

#include <ACGL/ACGL.hh>
15
#include <ACGL/OpenGL/Data/ColorSpace.hh>
16
17
18
19
20
21
22
23
#include <ACGL/OpenGL/Objects/Texture.hh>

#include <string>

namespace ACGL{
namespace OpenGL{

//! loads the texture and creates mip maps
Janis Born's avatar
Janis Born committed
24
SharedTexture2D loadTexture2D(const std::string& _filename, ColorSpace _colorSpace = ColorSpace::AUTO_DETECT);
25
26
27

//! loads the texture including mipmaps from a DDS file
//! supports DXT1, DXT3 and DXT5 compression
Janis Born's avatar
Janis Born committed
28
29
30
SharedTexture2D      loadTexture2DFromDDS     (const std::string& _filename, ColorSpace _colorSpace = ColorSpace::AUTO_DETECT);
SharedTexture3D      loadTexture3DFromDDS     (const std::string& _filename, ColorSpace _colorSpace = ColorSpace::AUTO_DETECT);
SharedTextureCubeMap loadTextureCubeMapFromDDS(const std::string& _filename, ColorSpace _colorSpace = ColorSpace::AUTO_DETECT);
31
32
33

}
}