//------------------------------------------- // GLWidget.h -- declarations for the OpenGL // drawing area //------------------------------------------- #ifndef GLWIDGET_H #define GLWIDGET_H #include #include #ifdef WIN32 #include #endif #include class GLWidget : public Fl_Gl_Window { public: enum DrawMode { DRAW_LINE, DRAW_FREE, DRAW_IMAGE, CLEAR_SCREEN }; GLWidget( int x, int y, int w, int h, const char *title = NULL ); void setWindowExtents(); int handle( int event ); void draw(); void changeMode( DrawMode ); void clearScreen(); void loadPPMImage(); // animation related declarations float posx, posy, t_param, pt1[2], pt2[2]; GLubyte *image; int image_w, image_h; private: int x0, x1, y0, y1; int num_points; bool useMipmaps, linearFiltering, useTexture; // GLubyte *floorTexture; GLuint texName; DrawMode drawmode; }; #endif // GLWIDGET_H