|
VuoWindowOpenGLInternal * | glWindow |
| The parent window; allows the view to access it while full-screen.
|
|
NSOpenGLContext * | windowedGlContext |
| The OpenGL context from Vuo's context pool; allows the windw to access it while the view is full-screen.
|
|
dispatch_queue_t | drawQueue |
| Queue to ensure that multiple threads don't attempt to draw to the same window simultaneously.
|
|
NSRect | viewport |
| The viewport in which we're rendering (it might not match the view's dimensions), relative to the parent view. In points (not pixels).
|
|
bool | reshapeNeeded |
| True if the view needs to recalculate the glViewport before drawing.
|
|
bool | skipDrawRect |
| True if drawRect should be temporarily ignored (e.g., during resizing).
|
|
- (id) initWithFrame: |
|
(NSRect) |
frame |
initCallback: |
|
(VuoGlContext glContext, float backingScaleFactor, void *) |
_initCallback |
updateBackingCallback: |
|
(VuoGlContext glContext, void *, float backingScaleFactor) |
_updateBackingCallback |
resizeCallback: |
|
(VuoGlContext glContext, void *, unsigned int width, unsigned int height) |
_resizeCallback |
drawCallback: |
|
(VuoGlContext glContext, void *) |
_drawCallback |
drawContext: |
|
(void *) |
_drawContext |
|
|
| |
Creates an OpenGL view that calls the given callbacks for rendering.
This function may only be called on the main thread.
Returns YES if this window is currently fullscreen.
Schedules the OpenGL view to be redrawn.
This can be used in both windowed and full-screen mode.
This function may be called from any thread.
- (void) setFullScreen: |
|
(BOOL) |
wantsFullScreen |
onScreen: |
|
(NSScreen *) |
screen |
|
|
| |
Switches between full-screen and windowed mode.
"Fullscreen" can mean 3 different things:
-[NSView enterFullScreenMode:withOptions:]
- 10.5+
- we don't use this at all
- Vuo's custom fullscreen mode —
- instant (no transition animation)
- achieved by removing the titlebar and resizing the window
- can go fullscreen on any user-specified VuoScreen
- can have multiple windows fullscreen simultaneously
-[NSWindow toggleFullScreen:]
- optional in 10.7 – 10.10, mandatory in 10.11+
- painfully slow transition animation
- can only have one window fullscreen when
System Preferences > Mission Control > Displays have separate Spaces
is unchecked
Vuo uses #2 whenever possible (when triggered by ⌘F or a node), and since #3 is now mandatory, Vuo supports it where needed — when the user presses the green button in the titlebar:
- the window goes fullscreen (#3)
- Vuo applies aspect-locking to the interior GL viewport
- pressing ⌘F or ESC, or using the
Change Fullscreen Status
node, initiates the painfully-slow transition back to windowed mode, symmetric to how the user entered fullscreen mode
This function may only be called on the main thread.
- (bool) callerRequestedRedraw |
|
protected |
True if an external caller (i.e., not resize or setFullScreen) requested that the GL view be redrawn.
The touch-circle mouse cursor.
The bounding box of circleImage
.
Draws onto the OpenGL context.
Argument to pass to callbacks (e.g. node instance data).
- (void(* initCallback)(VuoGlContext glContext, float backingScaleFactor, void *)) |
|
protected |
Initializes the OpenGL context.
- (bool) initCallbackCalled |
|
protected |
Has the init callback already been called?
- (void(* resizeCallback)(VuoGlContext glContext, void *, unsigned int width, unsigned int height)) |
|
protected |
Updates the OpenGL context when the view is resized.
- (void(* updateBackingCallback)(VuoGlContext glContext, void *, float backingScaleFactor)) |
|
protected |
Called when the screen changes.
- (dispatch_queue_t) drawQueue |
|
readwriteatomicassign |
Queue to ensure that multiple threads don't attempt to draw to the same window simultaneously.
The parent window; allows the view to access it while full-screen.
True if the view needs to recalculate the glViewport before drawing.
True if drawRect should be temporarily ignored (e.g., during resizing).
The viewport in which we're rendering (it might not match the view's dimensions), relative to the parent view. In points (not pixels).
- (NSOpenGLContext*) windowedGlContext |
|
readwriteatomicretain |
The OpenGL context from Vuo's context pool; allows the windw to access it while the view is full-screen.
The documentation for this class was generated from the following files: