1 #ifndef GLIMAGE_API_WINDOWS_H
2 #define GLIMAGE_API_WINDOWS_H
10 #include "envGLImage.h"
11 #include "ImageObserver_I.h"
12 #include "Displayable_A.h"
13 #include "GLPrimitiveDrawers.h"
14 #include "Graphic2Ds.h"
22 #include "ImageMOOs_I.h"
24 /*----------------------------------------------------------------------*\
26 \*---------------------------------------------------------------------*/
28 /*--------------------------------------*\
30 \*-------------------------------------*/
32 class CBI_GLIMAGE GLImages_A
: public Displayable_A
, public KeyListener_I
, public MouseListener_I
, public ImageObserver_I
35 /*--------------------------------------*\
37 \*-------------------------------------*/
41 GLImages_A(ImageMOOs_I
* ptrImageMOO
, bool isAnimationEnable
= true);
43 /*--------------------------------------*\
45 \*-------------------------------------*/
49 virtual ~GLImages_A();
51 /*--------------------------------------*\
53 \*-------------------------------------*/
57 virtual void init(Panel_A
&panel
);
59 virtual void reshape(Panel_A
&panel
, int w
, int h
);
61 virtual void display(Panel_A
&panel
);
63 virtual void release(Panel_A
&panel
);
65 virtual void onKeyPressed(const KeyEvent
&event
);
67 virtual void onMouseMoved(const MouseEvent
&event
);
69 virtual void onMousePressed(const MouseEvent
&event
);
71 virtual void onMouseReleased(const MouseEvent
&event
);
73 virtual void onMouseWheel(const MouseWheelEvent
&event
);
75 virtual void onImageUpdate();
79 virtual void fillPBO()=0;
81 virtual void drawPrimitives(Panel_A
&panel
);
83 virtual void createPBO();
85 virtual void createTexture();
91 void drawCredits(Panel_A
&panel
);
96 * Update view from model, still need to manualy repaint the Window
100 void toImageSpaceCoordinate(int x
, int y
, int &imageX
, int &imageY
);
102 /*--------------------------------------*\
104 \*-------------------------------------*/
112 * height of the frame
116 ImageMOOs_I
* getImageMOO();
122 GLuint
getTextureID();
124 /*--------------------------------------*\
126 \*-------------------------------------*/
130 bool isAnimationEnable() const;
132 /*--------------------------------------*\
134 \*-------------------------------------*/
138 void setAnimationEnable(bool isEnable
);
140 /*--------------------------------------*\
142 \*-------------------------------------*/
147 ImageMOOs_I
* ptrImageMOO
;
148 bool animationEnable
;
153 GLPrimitiveDrawers glPrimitiveDrawer
;
154 Graphic2Ds graphique2D
;