21template<
typename Window>
28 windowPtr->setup(settings);
35template<
typename Window>
36static void noopDeleter(
Window*){}
38template<
typename Window>
40 std::shared_ptr<Window> window = std::shared_ptr<Window>(windowPtr, std::function<
void(
Window *)>(noopDeleter<Window>));
45int ofRunApp(std::shared_ptr<ofBaseApp> && OFSA);
47void ofRunApp(
const std::shared_ptr<ofAppBaseWindow> & window, std::shared_ptr<ofBaseApp> && app);
116#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
117typedef unsigned long Window;
119typedef struct _XDisplay
Display;
124#if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES)
125struct __GLXcontextRec;
126typedef __GLXcontextRec * GLXContext;
127GLXContext ofGetGLXContext();
130#if defined(TARGET_LINUX) && defined(TARGET_OPENGLES)
136#if defined(TARGET_OSX)
137 void * ofGetNSGLContext();
138 void * ofGetCocoaWindow();
141#if defined(TARGET_WIN32)
142 HGLRC ofGetWGLContext();
143 HWND ofGetWin32Window();
Definition ofAppBaseWindow.h:21
Definition ofAppGLFWWindow.h:62
Definition ofBaseApp.h:14
The base renderer interface.
Definition ofGraphicsBaseTypes.h:279
Definition ofEvents.h:326
A class representing a 2D rectangle.
Definition ofRectangle.h:87
Definition ofWindowSettings.h:38
void setSize(int width, int height)
Definition ofWindowSettings.h:58
ofWindowMode windowMode
Definition ofWindowSettings.h:51
unsigned int height
Definition ofAppEGLWindow.cpp:125
unsigned int width
Definition ofAppEGLWindow.cpp:124
void * EGLSurface
Definition ofAppEGLWindow.h:29
void * EGLContext
Definition ofAppEGLWindow.h:30
unsigned long Window
Definition ofAppEGLWindow.h:21
void * EGLDisplay
Definition ofAppEGLWindow.h:27
struct _XDisplay Display
Definition ofAppEGLWindow.h:23
void ofExit(int status=0)
Definition ofAppRunner.cpp:346
float ofGetFrameRate()
Definition ofEvents.cpp:20
void ofSetClipboardString(const std::string &str)
Definition ofAppRunner.cpp:428
void ofSetCurrentRenderer(std::shared_ptr< ofBaseRenderer > renderer, bool setDefaults=false)
void ofSetFrameRate(int targetRate)
Definition ofEvents.cpp:10
bool ofIsCurrentThreadTheMainThread()
Definition ofAppRunner.cpp:331
int ofGetScreenWidth()
Definition ofAppRunner.cpp:395
int ofGetWindowHeight()
Definition ofAppRunner.cpp:418
std::string ofGetClipboardString()
Definition ofAppRunner.cpp:423
int ofGetWindowPositionX()
Definition ofAppRunner.cpp:385
void ofSetTimeModeFixedRate(uint64_t stepNanos=ofGetFixedStepForFps(60))
Definition ofUtils.cpp:263
int ofGetWidth()
Definition ofAppRunner.cpp:405
ofBaseApp * ofGetAppPtr()
Definition ofAppRunner.cpp:322
uint64_t ofGetFixedStepForFps(double fps)
Definition ofUtils.cpp:242
int ofRunMainLoop()
Definition ofAppRunner.cpp:210
int ofGetHeight()
Definition ofAppRunner.cpp:409
std::shared_ptr< ofAppBaseWindow > ofCreateWindow(const ofWindowSettings &settings)
Definition ofAppRunner.cpp:231
std::shared_ptr< ofBaseRenderer > & ofGetCurrentRenderer()
Definition ofAppRunner.cpp:317
void ofEnableSetupScreen()
Definition ofAppRunner.cpp:464
void ofSetMainLoop(const std::shared_ptr< ofMainLoop > &mainLoop)
glm::vec2 ofGetWindowSize()
Definition ofAppRunner.cpp:438
void ofSetEscapeQuitsApp(bool bQuitOnEsc)
Definition ofAppRunner.cpp:312
void ofSetWindowShape(int width, int height)
Definition ofAppRunner.cpp:380
ofOrientation ofGetOrientation()
Definition ofAppRunner.cpp:370
void ofSetupOpenGL(int w, int h, ofWindowMode screenMode)
Definition ofAppRunner.cpp:216
int ofGetWindowWidth()
Definition ofAppRunner.cpp:414
void ofSetOrientation(ofOrientation orientation, bool vFlip=true)
Definition ofAppRunner.cpp:361
uint64_t ofGetFrameNum()
Definition ofEvents.cpp:50
ofCoreEvents & ofEvents()
Definition ofAppRunner.cpp:297
float ofGetTargetFrameRate()
Definition ofEvents.cpp:30
int ofGetWindowMode()
Definition ofAppRunner.cpp:484
void ofSetWindowPosition(int x, int y)
Definition ofAppRunner.cpp:375
void ofSetFullscreen(bool fullscreen)
Definition ofAppRunner.cpp:479
ofAppBaseWindow * ofGetWindowPtr()
Definition ofAppRunner.cpp:336
void ofHideCursor()
Definition ofAppRunner.cpp:351
float ofRandomWidth()
Definition ofAppRunner.cpp:444
int ofGetWindowPositionY()
Definition ofAppRunner.cpp:390
int ofRunApp(std::shared_ptr< ofBaseApp > &&OFSA)
void ofDisableSetupScreen()
Definition ofAppRunner.cpp:469
int ofGetScreenHeight()
Definition ofAppRunner.cpp:400
float ofRandomHeight()
Definition ofAppRunner.cpp:449
void ofInit()
Definition ofAppRunner.cpp:117
std::shared_ptr< ofMainLoop > ofGetMainLoop()
Definition ofAppRunner.cpp:176
void ofSetWindowTitle(std::string title)
Definition ofAppRunner.cpp:459
std::thread::id ofGetMainThreadId()
Definition ofAppRunner.cpp:327
double ofGetLastFrameTime()
Definition ofEvents.cpp:40
void ofSetTimeModeFiltered(float alpha=0.9)
Definition ofUtils.cpp:279
std::shared_ptr< ofAppBaseWindow > ofGetCurrentWindow()
Definition ofAppRunner.cpp:341
void ofSetTimeModeSystem()
Definition ofUtils.cpp:247
ofRectangle ofGetWindowRect()
Definition ofAppRunner.cpp:454
bool ofDoesHWOrientation()
Definition ofAppRunner.cpp:433
void ofSetVerticalSync(bool bSync)
Definition ofAppRunner.cpp:489
void ofShowCursor()
Definition ofAppRunner.cpp:356
void ofToggleFullscreen()
Definition ofAppRunner.cpp:474
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