14 #ifndef COCOAGRAPHICSSTATEGUARDIAN_H 15 #define COCOAGRAPHICSSTATEGUARDIAN_H 21 #import <AppKit/NSOpenGL.h> 22 #import <OpenGL/OpenGL.h> 23 #import <CoreVideo/CoreVideo.h> 33 NSOpenGLPixelFormat *pixel_format,
int virtual_screen);
35 CGDirectDisplayID display,
47 NSOpenGLContext *_share_context;
48 NSOpenGLContext *_context;
49 NSOpenGLPixelFormat *_format =
nullptr;
52 CVDisplayLinkRef _display_link =
nullptr;
53 TrueMutexImpl _swap_lock;
54 TrueConditionVarImpl _swap_condition;
55 AtomicAdjust::Integer _last_wait_frame = 0;
58 virtual void query_gl_version();
59 virtual void *do_get_extension_func(
const char *name);
65 static void init_type() {
66 GLGraphicsStateGuardian::init_type();
68 GLGraphicsStateGuardian::get_class_type());
71 return get_class_type();
73 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
const FrameBufferProperties & get_fb_properties() const
Gets the FrameBufferProperties for all windows and buffers that use this GSG.
void unlock_context()
Unlocks the context.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void lock_context()
Locks the context.
A tiny specialization on GLGraphicsStateGuardian to add some Cocoa-specific information.
An object to create GraphicsOutputs that share a particular 3-D API.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...