Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
osxGraphicsStateGuardian Class Reference

A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information. More...

#include "osxGraphicsStateGuardian.h"

Inheritance diagram for osxGraphicsStateGuardian:

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
 

Detailed Description

A tiny specialization on GLGraphicsStateGuardian to add some wgl-specific information.

Definition at line 33 of file osxGraphicsStateGuardian.h.

Member Function Documentation

◆ atexit_function()

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().

◆ build_gl()

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().

◆ draw_resize_box()

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().

◆ get_gamma_table()

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().

◆ reset()

void osxGraphicsStateGuardian::reset ( )
virtual

Resets all internal state as if the gsg were newly created.

Definition at line 90 of file osxGraphicsStateGuardian.cxx.

References draw_resize_box().

◆ restore_gamma()

void osxGraphicsStateGuardian::restore_gamma ( )

Restore original gamma.

Definition at line 480 of file osxGraphicsStateGuardian.cxx.

References atexit_function().

Referenced by set_gamma().

◆ 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().

◆ 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().


The documentation for this class was generated from the following files: