Panda3D
|
A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information. More...
#include "osxGraphicsStateGuardian.h"
Public Member Functions | |
osxGraphicsStateGuardian (GraphicsEngine *engine, GraphicsPipe *pipe, osxGraphicsStateGuardian *share_with) | |
void | atexit_function () |
This function is passed to the atexit function. More... | |
OSStatus | build_gl (bool full_screen, bool pbuffer, FrameBufferProperties &fb_props) |
This function will build up a context for a gsg. More... | |
void | draw_resize_box () |
Draws an OSX-style resize icon in the bottom right corner of the current display region. More... | |
virtual TypeHandle | force_init_type () |
const AGLPixelFormat | get_agl_pixel_format () const |
AGLContext | get_context () |
bool | get_gamma_table () |
Static function for getting the orig gamma tables. More... | |
virtual TypeHandle | get_type () const |
virtual void | reset () |
Resets all internal state as if the gsg were newly created. More... | |
void | restore_gamma () |
Restore original gamma. More... | |
bool | set_gamma (PN_stdfloat gamma) |
Non static version of setting gamma. More... | |
bool | static_set_gamma (bool restore, PN_stdfloat gamma) |
Static function for setting gamma which is needed for atexit. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
GLint | _shared_buffer |
Friends | |
class | osxGraphicsBuffer |
A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information.
Definition at line 33 of file osxGraphicsStateGuardian.h.
void osxGraphicsStateGuardian::atexit_function | ( | void | ) |
This function is passed to the atexit function.
Definition at line 490 of file osxGraphicsStateGuardian.cxx.
Referenced by restore_gamma().
OSStatus osxGraphicsStateGuardian::build_gl | ( | bool | full_screen, |
bool | pbuffer, | ||
FrameBufferProperties & | fb_props | ||
) |
This function will build up a context for a gsg.
Definition at line 183 of file osxGraphicsStateGuardian.cxx.
References FrameBufferProperties::clear(), get_gamma_table(), and FrameBufferProperties::set_color_bits().
Referenced by draw_resize_box(), and osxGraphicsBuffer::end_frame().
void osxGraphicsStateGuardian::draw_resize_box | ( | ) |
Draws an OSX-style resize icon in the bottom right corner of the current display region.
This is normally done automatically at the end of each frame when the window is indicated as resizable, since the 3-D graphics overlay the normal, OS-drawn resize icon and the user won't be able see it.
Definition at line 121 of file osxGraphicsStateGuardian.cxx.
References build_gl(), and PNMImage::read().
Referenced by reset().
bool osxGraphicsStateGuardian::get_gamma_table | ( | void | ) |
Static function for getting the orig gamma tables.
Definition at line 397 of file osxGraphicsStateGuardian.cxx.
References static_set_gamma().
Referenced by build_gl().
|
virtual |
Resets all internal state as if the gsg were newly created.
Definition at line 90 of file osxGraphicsStateGuardian.cxx.
References draw_resize_box().
void osxGraphicsStateGuardian::restore_gamma | ( | ) |
Restore original gamma.
Definition at line 480 of file osxGraphicsStateGuardian.cxx.
References atexit_function().
Referenced by set_gamma().
bool osxGraphicsStateGuardian::set_gamma | ( | PN_stdfloat | gamma | ) |
Non static version of setting gamma.
Returns true on success.
Definition at line 466 of file osxGraphicsStateGuardian.cxx.
References restore_gamma().
Referenced by static_set_gamma().
bool osxGraphicsStateGuardian::static_set_gamma | ( | bool | restore, |
PN_stdfloat | gamma | ||
) |
Static function for setting gamma which is needed for atexit.
Definition at line 409 of file osxGraphicsStateGuardian.cxx.
References set_gamma().
Referenced by get_gamma_table().