Create windows, start the OF application and check info about it's state
The main classes in this module are windows for each platform and settings classes that can be passed to openFrameworks when creating the window. In most projects you don't even need to use them explicitly as openFrameworks will use them under the hood, select the correct one in each case and start and end the infinite loop.
All this usually happens in the main.cpp of your application, you can check any example to see how that works.
In some cases you'll want to specify the settings of the window being created, for example if you want to use a specific version of openGL you'll have a main.cpp like:
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofGLWindowSettings settings;
settings.setGLVersion(3,2);
ofCreateWindow(settings);
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp(new ofApp());
}
which explicitly creates a window that uses openGL 3.2.
Also when creating multiple windows in one application you'll need to use the different window settings classes.
There's a base settings window that will work on any platform: ofWindowSettings this allows to specify really basic settings like the size of the window or if we want a fullscreen application.
Then there's an specific GL window settings class for openGL based applications (almost everyone except for windowless apps right now), ofGLWindowSettings for plain openGL and ofGLESWindowSettings for openGL ES, the flavour of openGL used in mobiles or linux arm boards like the rasperry.
In the desktop since GLFW is the default windowing system, you can use ofGLFWWindowSettings which allows to specify settings more specific to a desktop environment like if the window is iconified when the application starts, it's position in the desktop or the monitor in which it should appear.
All these settings classes are used in the same way, you create an instance, set it's fields and pass it to ofCreateWindow which creates a window, you can hold that window on a variable like:
auto window = ofCreateWindow(settings);
or just ignore it if the application will only have one window. There's some examples on multiwindow applications in the examples/events folder.
- ofAppBaseWindow
- close()
- disableSetupScreen()
- doesHWOrientation()
- draw()
- enableSetupScreen()
- events()
- finishRender()
- getClipboardString()
- getGLXContext()
- getHeight()
- getOrientation()
- getScreenSize()
- getWidth()
- getWindowContext()
- getWindowMode()
- getWindowPosition()
- getWindowShouldClose()
- getWindowSize()
- getX11Display()
- getX11Window()
- hideCursor()
- makeCurrent()
- renderer()
- setClipboardString()
- setFullscreen()
- setOrientation()
- setVerticalSync()
- setWindowPosition()
- setWindowShape()
- setWindowShouldClose()
- setWindowTitle()
- setup()
- showCursor()
- startRender()
- swapBuffers()
- toggleFullscreen()
- update()
- ofAppEGLWindow
- ofAppEGLWindow()
- ~ofAppEGLWindow()
- allowsMultiWindow()
- close()
- disableSetupScreen()
- doesHWOrientation()
- doesLoop()
- draw()
- enableSetupScreen()
- events()
- finishRender()
- getEglConfig()
- getEglContext()
- getEglDisplay()
- getEglSurface()
- getEglVersionMajor()
- getEglVersionMinor()
- getHeight()
- getOrientation()
- getScreenSize()
- getWidth()
- getWindowMode()
- getWindowPosition()
- getWindowSize()
- getX11Display()
- getX11Window()
- hideCursor()
- loop()
- makeCurrent()
- needsPolling()
- pollEvents()
- renderer()
- setFullscreen()
- setOrientation()
- setThreadTimeout()
- setVerticalSync()
- setWindowPosition()
- setWindowShape()
- setWindowTitle()
- setup()
- showCursor()
- startRender()
- swapBuffers()
- toggleFullscreen()
- update()
- ofAppGLFWWindow
- ofAppGLFWWindow()
- ~ofAppGLFWWindow()
- allowsMultiWindow()
- close()
- disableSetupScreen()
- doesLoop()
- draw()
- enableSetupScreen()
- events()
- finishRender()
- getClipboardString()
- getGLFWWindow()
- getGLXContext()
- getHeight()
- getOrientation()
- getPixelScreenCoordScale()
- getScreenSize()
- getSettings()
- getWidth()
- getWindowContext()
- getWindowMode()
- getWindowPosition()
- getWindowShouldClose()
- getWindowSize()
- getX11Display()
- getX11Window()
- getX11XIC()
- hideCursor()
- iconify()
- isWindowActive()
- isWindowIconified()
- isWindowResizeable()
- listMonitors()
- listVideoModes()
- loop()
- makeCurrent()
- needsPolling()
- operator=()
- pollEvents()
- renderer()
- setClipboardString()
- setFullscreen()
- setOrientation()
- setVerticalSync()
- setWindowPosition()
- setWindowShape()
- setWindowShouldClose()
- setWindowTitle()
- setup()
- showCursor()
- startRender()
- swapBuffers()
- toggleFullscreen()
- update()
- ofAppGlutWindow
- allowsMultiWindow()
- close()
- disableSetupScreen()
- doesLoop()
- draw()
- enableSetupScreen()
- events()
- finishRender()
- getHeight()
- getOrientation()
- getScreenSize()
- getWidth()
- getWindowMode()
- getWindowPosition()
- getWindowSize()
- hideCursor()
- loop()
- needsPolling()
- pollEvents()
- renderer()
- setDoubleBuffering()
- setFullscreen()
- setGlutDisplayString()
- setOrientation()
- setVerticalSync()
- setWindowPosition()
- setWindowShape()
- setWindowTitle()
- setup()
- showCursor()
- startRender()
- swapBuffers()
- toggleFullscreen()
- update()
- displayString
- ofAppRunner
- noopDeleter()
- ofCreateWindow()
- ofDoesHWOrientation()
- ofEvents()
- ofExit()
- ofGetAppPtr()
- ofGetClipboardString()
- ofGetCurrentRenderer()
- ofGetCurrentWindow()
- ofGetFixedStepForFps()
- ofGetFrameNum()
- ofGetFrameRate()
- ofGetGLXContext()
- ofGetHeight()
- ofGetLastFrameTime()
- ofGetMainLoop()
- ofGetOrientation()
- ofGetScreenHeight()
- ofGetScreenWidth()
- ofGetTargetFrameRate()
- ofGetWidth()
- ofGetWindowHeight()
- ofGetWindowMode()
- ofGetWindowPositionX()
- ofGetWindowPositionY()
- ofGetWindowPtr()
- ofGetWindowRect()
- ofGetWindowSize()
- ofGetWindowWidth()
- ofGetX11Display()
- ofGetX11Window()
- ofHideCursor()
- ofInit()
- ofRandomHeight()
- ofRandomWidth()
- ofRunApp()
- ofRunMainLoop()
- ofSetClipboardString()
- ofSetCurrentRenderer()
- ofSetEscapeQuitsApp()
- ofSetFrameRate()
- ofSetFullscreen()
- ofSetMainLoop()
- ofSetOrientation()
- ofSetTimeModeFiltered()
- ofSetTimeModeFixedRate()
- ofSetTimeModeSystem()
- ofSetVerticalSync()
- ofSetWindowPosition()
- ofSetWindowShape()
- ofSetWindowTitle()
- ofSetupOpenGL()
- ofShowCursor()
- ofToggleFullscreen()
- ofBaseApp
- dragEvent()
- dragged()
- draw()
- exit()
- gotMessage()
- keyPressed()
- keyReleased()
- messageReceived()
- mouseDragged()
- mouseEntered()
- mouseExited()
- mouseMoved()
- mousePressed()
- mouseReleased()
- mouseScrolled()
- setup()
- touchCancelled()
- touchDoubleTap()
- touchDown()
- touchMoved()
- touchUp()
- update()
- windowResized()
- mouseX
- mouseY