reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofAppGlutWindow.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofAppBaseWindow.h"
4#include "ofEvents.h"
5#include "ofTypes.h"
6#include "ofPixels.h"
7#include "ofConstants.h"
8
9class ofBaseApp;
10class ofBaseRenderer;
11
13
14public:
15
18
19 static bool doesLoop(){ return true; }
20 static bool allowsMultiWindow(){ return false; }
21 static void loop();
22 static bool needsPolling(){ return false; }
23 static void pollEvents(){ }
24
26 void setup(const ofGLWindowSettings & settings);
27 void update();
28 void draw();
29 void close();
30
31 void setDoubleBuffering(bool _bDoubleBuffered);
32
33 //note if you fail to set a compatible string the app will not launch
34 void setGlutDisplayString(std::string str);
35
36 void hideCursor();
37 void showCursor();
38
39 void setFullscreen(bool fullScreen);
40 void toggleFullscreen();
41
42 void setWindowTitle(std::string title);
43 void setWindowPosition(int x, int y);
44 void setWindowShape(int w, int h);
45
46 glm::vec2 getWindowPosition();
47 glm::vec2 getWindowSize();
48 glm::vec2 getScreenSize();
49
50 void setOrientation(ofOrientation orientation);
52
53 int getWidth();
54 int getHeight();
55
57
58 void enableSetupScreen();
59 void disableSetupScreen();
60
61 void setVerticalSync(bool enabled);
62 void swapBuffers();
63 void startRender();
64 void finishRender();
65
67 std::shared_ptr<ofBaseRenderer> & renderer();
68
69private:
70 static void display(void);
71 static void mouse_cb(int button, int state, int x, int y);
72 static void motion_cb(int x, int y);
73 static void passive_motion_cb(int x, int y);
74 static void idle_cb(void);
75 static void keyboard_cb(unsigned char key, int x, int y);
76 static void keyboard_up_cb(unsigned char key, int x, int y);
77 static void special_key_cb(int key, int x, int y);
78 static void special_key_up_cb(int key, int x, int y);
79 static int special_key_to_of(int key);
80 static void resize_cb(int w, int h);
81 static void entry_cb(int state);
82 static void exit_cb();
83 static void dragEvent(char ** fileNames, int howManyFiles, int dragX, int dragY);
84 std::string displayString;
85
86 bool iconSet;
87#ifdef TARGET_LINUX
88 void setWindowIcon(const std::string & path);
89 void setWindowIcon(const ofPixels & iconPixels);
90#endif
91
92 ofCoreEvents coreEvents;
93 std::shared_ptr<ofBaseRenderer> currentRenderer;
94 int windowId;
95};
96
Definition ofAppBaseWindow.h:103
virtual void setup(const ofWindowSettings &settings)=0
Definition ofAppGlutWindow.h:12
void finishRender()
Definition ofAppGlutWindow.cpp:693
int getHeight()
Definition ofAppGlutWindow.cpp:437
void swapBuffers()
Definition ofAppGlutWindow.cpp:683
void hideCursor()
Definition ofAppGlutWindow.cpp:468
ofOrientation getOrientation()
Definition ofAppGlutWindow.cpp:450
void showCursor()
Definition ofAppGlutWindow.cpp:477
static bool needsPolling()
Definition ofAppGlutWindow.h:22
void setup(const ofGLWindowSettings &settings)
Definition ofAppGlutWindow.cpp:199
void setOrientation(ofOrientation orientation)
Definition ofAppGlutWindow.cpp:445
ofWindowMode getWindowMode()
Definition ofAppGlutWindow.cpp:486
void setVerticalSync(bool enabled)
Definition ofAppGlutWindow.cpp:527
void startRender()
Definition ofAppGlutWindow.cpp:688
void setGlutDisplayString(std::string str)
Definition ofAppGlutWindow.cpp:189
std::shared_ptr< ofBaseRenderer > & renderer()
Definition ofAppGlutWindow.cpp:583
void toggleFullscreen()
Definition ofAppGlutWindow.cpp:491
void update()
Definition ofAppGlutWindow.cpp:369
void setFullscreen(bool fullScreen)
Definition ofAppGlutWindow.cpp:504
int getWidth()
Definition ofAppGlutWindow.cpp:429
void setWindowPosition(int x, int y)
Definition ofAppGlutWindow.cpp:455
~ofAppGlutWindow()
Definition ofAppGlutWindow.h:17
void enableSetupScreen()
Definition ofAppGlutWindow.cpp:517
void setWindowTitle(std::string title)
Definition ofAppGlutWindow.cpp:397
void setWindowShape(int w, int h)
Definition ofAppGlutWindow.cpp:460
void setDoubleBuffering(bool _bDoubleBuffered)
Definition ofAppGlutWindow.cpp:194
static bool allowsMultiWindow()
Definition ofAppGlutWindow.h:20
glm::vec2 getScreenSize()
Definition ofAppGlutWindow.cpp:418
static void loop()
Definition ofAppGlutWindow.cpp:390
void close()
Definition ofAppGlutWindow.cpp:379
ofCoreEvents & events()
Definition ofAppGlutWindow.cpp:578
glm::vec2 getWindowPosition()
Definition ofAppGlutWindow.cpp:407
static void pollEvents()
Definition ofAppGlutWindow.h:23
void disableSetupScreen()
Definition ofAppGlutWindow.cpp:522
ofAppGlutWindow()
Definition ofAppGlutWindow.cpp:167
void draw()
Definition ofAppGlutWindow.cpp:374
glm::vec2 getWindowSize()
Definition ofAppGlutWindow.cpp:402
static bool doesLoop()
Definition ofAppGlutWindow.h:19
Definition ofBaseApp.h:14
The base renderer interface.
Definition ofGraphicsBaseTypes.h:279
Definition ofEvents.h:326
Definition ofWindowSettings.h:92
ofOrientation
Used to represent the available screen orientations.
Definition ofWindowSettings.h:25
ofWindowMode
Used to represent the available windowing modes for the application.
Definition ofWindowSettings.h:8