Go to the documentation of this file.00001 #pragma once
00002
00003 #include "ofConstants.h"
00004 #include "ofAppBaseWindow.h"
00005
00006
00007 #ifdef TARGET_WIN32
00008 #define GLUT_BUILDING_LIB
00009 #include "glut.h"
00010 #endif
00011 #ifdef TARGET_OSX
00012 #include <GLUT/glut.h>
00013 #endif
00014 #ifdef TARGET_LINUX
00015 #include <GL/glut.h>
00016 #endif
00017
00018 class ofPoint;
00019 class ofBaseApp;
00020
00021 class ofAppGlutWindow : public ofAppBaseWindow {
00022
00023 public:
00024
00025 ofAppGlutWindow();
00026 ~ofAppGlutWindow(){}
00027
00028 void setupOpenGL(int w, int h, int screenMode);
00029 void initializeWindow();
00030 void runAppViaInfiniteLoop(ofBaseApp * appPtr);
00031
00032 void hideCursor();
00033 void showCursor();
00034
00035 void setFullscreen(bool fullScreen);
00036 void toggleFullscreen();
00037
00038 static void exitApp();
00039
00040 void setWindowTitle(string title);
00041 void setWindowPosition(int x, int y);
00042 void setWindowShape(int w, int h);
00043
00044 ofPoint getWindowPosition();
00045 ofPoint getWindowSize();
00046 ofPoint getScreenSize();
00047
00048 int getWindowMode();
00049
00050 int getFrameNum();
00051 float getFrameRate();
00052 void setFrameRate(float targetRate);
00053
00054 void enableSetupScreen();
00055 void disableSetupScreen();
00056
00057 static void display(void);
00058 static void mouse_cb(int button, int state, int x, int y);
00059 static void motion_cb(int x, int y);
00060 static void passive_motion_cb(int x, int y);
00061 static void idle_cb(void);
00062 static void keyboard_cb(unsigned char key, int x, int y);
00063 static void keyboard_up_cb(unsigned char key, int x, int y);
00064 static void special_key_cb(int key, int x, int y) ;
00065 static void special_key_up_cb(int key, int x, int y) ;
00066 static void resize_cb(int w, int h);
00067
00068
00069
00070
00071 };
00072