1 #import <Cocoa/Cocoa.h>
2 #import <OpenGL/OpenGL.h>
3 #import <OpenGL/CGLMacro.h>
4 #import <VVBasics/VVBasics.h>
10 extern OSSpinLock _glSceneStatLock;
11 extern NSMutableArray *_gpuVendorArray;
12 extern BOOL _integratedGPUFlag;
13 extern BOOL _nvidiaGPUFlag;
19 VVGLFlushModeApple = 3,
20 VVGLFlushModeFinish = 4
38 OSSpinLock renderThreadLock;
41 NSOpenGLContext *sharedContext;
42 NSOpenGLContext *context;
43 NSOpenGLPixelFormat *customPixelFormat;
44 CGColorSpaceRef colorSpace;
62 GLfloat clearColor[4];
63 BOOL clearColorUpdated;
64 VVGLFlushMode flushMode;
69 + (NSMutableArray *) gpuVendorArray;
71 + (BOOL) integratedGPUFlag;
73 + (BOOL) nvidiaGPUFlag;
75 + (GLuint) glDisplayMaskForAllScreens;
77 + (NSOpenGLPixelFormat *) defaultPixelFormat;
78 + (NSOpenGLPixelFormat *) doubleBufferPixelFormat;
79 + (NSOpenGLPixelFormat *) defaultQTPixelFormat;
80 + (NSOpenGLPixelFormat *) fsaaPixelFormat;
81 + (NSOpenGLPixelFormat *) doubleBufferFSAAPixelFormat;
84 - (id) initWithSharedContext:(NSOpenGLContext *)c;
86 - (id) initWithSharedContext:(NSOpenGLContext *)c sized:(NSSize)s;
88 - (id) initWithSharedContext:(NSOpenGLContext *)c pixelFormat:(NSOpenGLPixelFormat *)p;
90 - (id) initWithSharedContext:(NSOpenGLContext *)c pixelFormat:(NSOpenGLPixelFormat *)p sized:(NSSize)s;
91 - (void) prepareToBeDeleted;
94 - (
VVBuffer *) allocAndRenderABuffer;
96 - (void) renderInFBO:(GLuint)f colorTex:(GLuint)t depthTex:(GLuint)d;
97 - (void) renderInMSAAFBO:(GLuint)mf colorRB:(GLuint)mc depthRB:(GLuint)md fbo:(GLuint)f colorTex:(GLuint)t depthTex:(GLuint)d;
108 - (void) renderInMSAAFBO:(GLuint)mf colorRB:(GLuint)mc depthRB:(GLuint)md fbo:(GLuint)f colorTex:(GLuint)t depthTex:(GLuint)d target:(GLuint)texTarget;
109 - (void) renderBlackFrameInFBO:(GLuint)f colorTex:(GLuint)t target:(GLuint)tt;
110 - (void) renderOpaqueBlackFrameInFBO:(GLuint)f colorTex:(GLuint)t target:(GLuint)tt;
111 - (void) renderRedFrameInFBO:(GLuint)f colorTex:(GLuint)t target:(GLuint)tt;
112 - (void) _renderPrep;
113 - (void) _initialize;
115 - (void) _renderCleanup;
117 - (NSOpenGLContext *) sharedContext;
118 - (NSOpenGLContext *) context;
119 - (CGLContextObj) CGLContextObj;
120 - (NSOpenGLPixelFormat *) customPixelFormat;
121 - (CGColorSpaceRef) colorSpace;
123 @property (assign,readwrite) NSSize size;
124 - (void) setFlipped:(BOOL)n;
127 - (void) setPerformClear:(BOOL)n;
129 - (void) setClearNSColor:(NSColor *)c;
131 - (void) setClearColor:(GLfloat *)c;
133 - (void) setClearColors:(GLfloat)r :(GLfloat)g :(GLfloat)b :(GLfloat)a;
135 @property (assign,readwrite) BOOL initialized;
137 @property (assign, readwrite)
id renderTarget;
139 @property (assign, readwrite)
SEL renderSelector;
140 @property (assign, readwrite) VVGLFlushMode flushMode;
141 @property (assign, readwrite)
int swapInterval;
SEL renderSelector
Every time this scene renders, the "renderSelector" is called on "renderTarget". You put your drawing...
Definition: GLScene.h:47
VVBuffer represents a buffer- almost always in VRAM as a GL texture or renderbuffer- created and mana...
Definition: VVBuffer.h:134
NSSize size
Set the size at which this scene should render.
Definition: GLScene.h:58
Wrapper around a GL context with the intent of standardizing the more common render-to-texture operat...
Definition: GLScene.h:34
id renderTarget
Every time this scene renders, the "renderSelector" is called on "renderTarget".
Definition: GLScene.h:46
Similar to NSMutableArray, but thread-safe. Internally, uses an NSMutableArray and a rwlock...
Definition: MutLockArray.h:20