-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImage.h
56 lines (45 loc) · 1.74 KB
/
Image.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
53
54
55
56
////////////////////////////////////////////////////////////////////////////////
/// @file
/// @brief Contains wrapper class for Qt image to hide Qt includes/methods.
////////////////////////////////////////////////////////////////////////////////
#ifndef _IMAGE_H_
#define _IMAGE_H_
// STL
#include <memory>
#include <string>
// GLM
// Avoiding GLInclude.h because of Qt/opengl include issue.
#include <glm/vec2.hpp>
#include <glm/vec4.hpp>
// Qt
class QImage;
////////////////////////////////////////////////////////////////////////////////
/// @brief Wrapper class for Qt image to hide includes and methods.
////////////////////////////////////////////////////////////////////////////////
class Image {
public:
////////////////////////////////////////////////////////////////////////////
/// @brief Constructor
/// @param _filename Filename for image.
explicit Image(const std::string& _filename);
////////////////////////////////////////////////////////////////////////////
/// @brief Destructor
~Image();
////////////////////////////////////////////////////////////////////////////
/// @brief Deleted copy constructor
/// @param _image Image
Image(const Image& _image) = delete;
////////////////////////////////////////////////////////////////////////////
/// @brief Deleted copy assignment
/// @param _image Image
Image& operator=(const Image& _image) = delete;
////////////////////////////////////////////////////////////////////////////
/// @brief Initialization
/// @return Texture name for open gl.
///
/// Note cannot use GLuint here because of Qt + open GL include error.
unsigned int initialize();
private:
QImage* m_textureData; ///< Texture array data
};
#endif