source:
orxonox.OLD/trunk/src/lib/gui/gl/glgui_image.h
@
10209
Last change on this file since 10209 was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 925 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[5366] | 2 | * @file glgui_image.h |
3 | * The gl_Image widget of th openglGUI | |
[5360] | 4 | * |
5 | */ | |
[1853] | 6 | |
[5366] | 7 | #ifndef _GLGUI_IMAGE_H |
8 | #define _GLGUI_IMAGE_H | |
[1853] | 9 | |
[8035] | 10 | #include "glgui_widget.h" |
[1853] | 11 | |
[4838] | 12 | // FORWARD DECLARATION |
[5392] | 13 | struct SDL_Surface; |
[7779] | 14 | namespace OrxGui |
15 | { | |
[3543] | 16 | |
[7779] | 17 | //! This is Image part of the openglGUI class |
18 | /** | |
19 | * | |
20 | */ | |
21 | class GLGuiImage : public GLGuiWidget | |
22 | { | |
[9869] | 23 | ObjectListDeclaration(GLGuiImage); |
[7779] | 24 | public: |
25 | GLGuiImage(); | |
26 | virtual ~GLGuiImage(); | |
[2036] | 27 | |
[8035] | 28 | void loadImageFromTexture(const Texture& texture); |
29 | ||
30 | void loadImageFromFile(const std::string& fileName); | |
[7779] | 31 | void loadImageFromSDLSurface(SDL_Surface* surface); |
[8035] | 32 | void loadImageFromDisplayList(GLuint texture); |
[1853] | 33 | |
[8035] | 34 | virtual void draw() const; |
[1853] | 35 | |
[9406] | 36 | sigslot::signal0<> imageChanged; |
[8035] | 37 | |
[8448] | 38 | protected: |
39 | virtual void updateFrontColor(); | |
40 | virtual void resize(); | |
41 | ||
42 | ||
[7779] | 43 | private: |
[8035] | 44 | void init(); |
[3245] | 45 | |
[8035] | 46 | private: |
[8448] | 47 | Rect2D _imagePlane; |
48 | Material _imageMaterial; | |
[7779] | 49 | }; |
50 | } | |
[5366] | 51 | #endif /* _GLGUI_IMAGE_H */ |
Note: See TracBrowser
for help on using the repository browser.