TextureDataControlFilePPM.hh 2.09 KB
Newer Older
Robert Menzel's avatar
Robert Menzel committed
1
2
3
4
5
6
7
8
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, 2012 Computer Graphics Group RWTH Aachen University    //
// All rights reserved.                                                       //
////////////////////////////////////////////////////////////////////////////////

#ifndef ACGL_OPENGL_CONTROLLER_TEXTUREDATACONTROLFILEPPM_HH
#define ACGL_OPENGL_CONTROLLER_TEXTUREDATACONTROLFILEPPM_HH

9
10
11
12
13
/**
 * A minimal ppm loader (with some bugs). No external dependencies, so this is at least
 * one image type that can be loaded without extra libs.
 */

Robert Menzel's avatar
Robert Menzel committed
14
15
#include <ACGL/ACGL.hh>

16
#include <ACGL/OpenGL/Controller/DataControlFile.hh>
Robert Menzel's avatar
Robert Menzel committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <ACGL/OpenGL/InitStaticFileTypes.hh>

namespace ACGL{
namespace OpenGL{

class TextureDataControlFilePPM : public TextureDataControlFile
{
    friend void initStaticFileTypes(void);

    // ========================================================================================================= \/
    // ============================================================================================ CONSTRUCTORS \/
    // ========================================================================================================= \/
public:
    TextureDataControlFilePPM(const std::string& _filename)
    :   TextureDataControlFile(_filename)
    {}
    virtual ~TextureDataControlFilePPM(void) {}

    static SharedTextureDataControlFile creator(const std::string& _filename) { return SharedTextureDataControlFile(new TextureDataControlFilePPM(_filename)); }

    // ===================================================================================================== \/
    // ============================================================================================ OVERRIDE \/
    // ===================================================================================================== \/
private:
    virtual bool load(SharedTextureData& texture) const;

private:
    static int_t registerType(void);
};

ACGL_SMARTPOINTER_TYPEDEFS(TextureDataControlFilePPM)

} // OpenGL
} // ACGL

#endif // ACGL_OPENGL_CONTROLLER_TEXTUREDATACONTROLFILEPPM_HH