Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends

osxGraphicsStateGuardian Class Reference

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

#include "osxGraphicsStateGuardian.h"

List of all members.

Public Member Functions

 osxGraphicsStateGuardian (GraphicsEngine *engine, GraphicsPipe *pipe, osxGraphicsStateGuardian *share_with)
void atexit_function ()
 This function is passed to the atexit function.
OSStatus build_gl (bool full_screen, bool pbuffer, FrameBufferProperties &fb_props)
 This function will build up a context for a gsg.
void draw_resize_box ()
 Draws an OSX-style resize icon in the bottom right corner of the current display region.
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.
virtual TypeHandle get_type () const
virtual void reset ()
 Resets all internal state as if the gsg were newly created.
void restore_gamma ()
 Restore original gamma.
bool set_gamma (PN_stdfloat gamma)
 Non static version of setting gamma.
bool static_set_gamma (bool restore, PN_stdfloat gamma)
 Static function for setting gamma which is needed for atexit.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Public Attributes

GLint _shared_buffer

Protected Member Functions

virtual void * do_get_extension_func (const char *prefix, const char *name)
 Returns the pointer to the GL extension function with the indicated name.

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

void osxGraphicsStateGuardian::atexit_function ( void  )

This function is passed to the atexit function.

Definition at line 487 of file osxGraphicsStateGuardian.cxx.

References static_set_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.

Referenced by osxGraphicsBuffer::open_buffer().

void * osxGraphicsStateGuardian::do_get_extension_func ( const char *  prefix,
const char *  name 
) [protected, virtual]

Returns the pointer to the GL extension function with the indicated name.

It is the responsibility of the caller to ensure that the required extension is defined in the OpenGL runtime prior to calling this; it is an error to call this for a function that is not defined.

Definition at line 41 of file osxGraphicsStateGuardian.cxx.

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 PNMImage::read().

bool osxGraphicsStateGuardian::get_gamma_table ( void  )

Static function for getting the orig gamma tables.

Definition at line 394 of file osxGraphicsStateGuardian.cxx.

void osxGraphicsStateGuardian::reset ( ) [virtual]

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

Definition at line 90 of file osxGraphicsStateGuardian.cxx.

void osxGraphicsStateGuardian::restore_gamma ( )

Restore original gamma.

Definition at line 477 of file osxGraphicsStateGuardian.cxx.

References static_set_gamma().

bool osxGraphicsStateGuardian::set_gamma ( PN_stdfloat  gamma)

Non static version of setting gamma.

Returns true on success.

Definition at line 463 of file osxGraphicsStateGuardian.cxx.

References 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 406 of file osxGraphicsStateGuardian.cxx.

Referenced by atexit_function(), restore_gamma(), and set_gamma().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations