Line | |
---|
1 | /*! |
---|
2 | * @file glgui_image.h |
---|
3 | * The gl_Image widget of th openglGUI |
---|
4 | * |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _GLGUI_IMAGE_H |
---|
8 | #define _GLGUI_IMAGE_H |
---|
9 | |
---|
10 | #include "glgui_widget.h" |
---|
11 | |
---|
12 | // FORWARD DECLARATION |
---|
13 | struct SDL_Surface; |
---|
14 | namespace OrxGui |
---|
15 | { |
---|
16 | |
---|
17 | //! This is Image part of the openglGUI class |
---|
18 | /** |
---|
19 | * |
---|
20 | */ |
---|
21 | class GLGuiImage : public GLGuiWidget |
---|
22 | { |
---|
23 | ObjectListDeclaration(GLGuiImage); |
---|
24 | public: |
---|
25 | GLGuiImage(); |
---|
26 | virtual ~GLGuiImage(); |
---|
27 | |
---|
28 | void loadImageFromTexture(const Texture& texture); |
---|
29 | |
---|
30 | void loadImageFromFile(const std::string& fileName); |
---|
31 | void loadImageFromSDLSurface(SDL_Surface* surface); |
---|
32 | void loadImageFromDisplayList(GLuint texture); |
---|
33 | |
---|
34 | virtual void draw() const; |
---|
35 | |
---|
36 | sigslot::signal0<> imageChanged; |
---|
37 | |
---|
38 | protected: |
---|
39 | virtual void updateFrontColor(); |
---|
40 | virtual void resize(); |
---|
41 | |
---|
42 | |
---|
43 | private: |
---|
44 | void init(); |
---|
45 | |
---|
46 | private: |
---|
47 | Rect2D _imagePlane; |
---|
48 | Material _imageMaterial; |
---|
49 | }; |
---|
50 | } |
---|
51 | #endif /* _GLGUI_IMAGE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.