Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FrameBufferProperties Class Reference

A container for the various kinds of properties we might ask to have on a graphics frameBuffer before we create a GSG. More...

#include <frameBufferProperties.h>

List of all members.

Public Types

enum  FrameBufferMode {
  FM_rgba = 0x0000, FM_rgb = 0x0000, FM_index = 0x0001, FM_single_buffer = 0x0000,
  FM_double_buffer = 0x0002, FM_triple_buffer = 0x0004, FM_accum = 0x0008, FM_alpha = 0x0010,
  FM_depth = 0x0020, FM_stencil = 0x0040, FM_multisample = 0x0080, FM_stereo = 0x0100,
  FM_luminance = 0x0200
}

Public Member Functions

 FrameBufferProperties ()
 FrameBufferProperties (const FrameBufferProperties &copy)
void operator= (const FrameBufferProperties &copy)
 ~FrameBufferProperties ()
bool operator== (const FrameBufferProperties &other) const
bool operator!= (const FrameBufferProperties &other) const
void clear ()
 Unsets all properties that have been specified so far, and resets the FrameBufferProperties structure to its initial empty state.

bool is_any_specified () const
 Returns true if any properties have been specified, false otherwise.

void set_frame_buffer_mode (int frameBuffer_mode)
 Specifies the set of graphics properties that are required for the context associated with the window.

int get_frame_buffer_mode () const
 Returns the set of graphics properties that are in effect for the window.

bool has_frame_buffer_mode () const
 Returns true if the frameBuffer mode has been specified, false otherwise.

void clear_frame_buffer_mode ()
 Removes the frameBuffer_mode specification from the properties.

void set_depth_bits (int depth_bits)
 Specifies the minimum number of bits that are required for the depth buffer.

int get_depth_bits () const
 Returns the number of bits specified for the depth buffer.

bool has_depth_bits () const
 Returns true if the number of bits for the depth buffer has been specified, false otherwise.

void clear_depth_bits ()
 Removes the depth_bits specification from the properties.

void set_color_bits (int color_bits)
 Specifies the minimum number of bits that are required for all three channels of the color buffer.

int get_color_bits () const
 Returns the number of bits specified for the color buffer.

bool has_color_bits () const
 Returns true if the number of bits for the color buffer has been specified, false otherwise.

void clear_color_bits ()
 Removes the color_bits specification from the properties.

void add_properties (const FrameBufferProperties &other)
 Sets any properties that are explicitly specified in other on this object.

void output (ostream &out) const
 Sets any properties that are explicitly specified in other on this object.


Private Types

enum  Specified { S_frame_buffer_mode = 0x0200, S_depth_bits = 0x0400, S_color_bits = 0x0800 }

Private Attributes

int _specified
int _flags
int _frame_buffer_mode
int _depth_bits
int _color_bits


Detailed Description

A container for the various kinds of properties we might ask to have on a graphics frameBuffer before we create a GSG.

Definition at line 38 of file frameBufferProperties.h.


Member Enumeration Documentation

enum FrameBufferProperties::FrameBufferMode
 

Enumeration values:
FM_rgba 
FM_rgb 
FM_index 
FM_single_buffer 
FM_double_buffer 
FM_triple_buffer 
FM_accum 
FM_alpha 
FM_depth 
FM_stencil 
FM_multisample 
FM_stereo 
FM_luminance 

Definition at line 48 of file frameBufferProperties.h.

enum FrameBufferProperties::Specified [private]
 

Enumeration values:
S_frame_buffer_mode 
S_depth_bits 
S_color_bits 

Definition at line 90 of file frameBufferProperties.h.


Constructor & Destructor Documentation

FrameBufferProperties::FrameBufferProperties  ) 
 

Definition at line 33 of file frameBufferProperties.cxx.

References _color_bits, _depth_bits, _flags, _frame_buffer_mode, and _specified.

FrameBufferProperties::FrameBufferProperties const FrameBufferProperties &  copy  )  [inline]
 

Definition at line 31 of file frameBufferProperties.I.

References INLINE.

FrameBufferProperties::~FrameBufferProperties  )  [inline]
 

Definition at line 43 of file frameBufferProperties.I.

References INLINE, and operator==().


Member Function Documentation

void FrameBufferProperties::add_properties const FrameBufferProperties &  other  ) 
 

Sets any properties that are explicitly specified in other on this object.

Leaves other properties unchanged.

Definition at line 103 of file frameBufferProperties.cxx.

References FM_accum, FM_alpha, FM_double_buffer, FM_index, FM_triple_buffer, get_frame_buffer_mode(), and has_frame_buffer_mode().

void FrameBufferProperties::clear  ) 
 

Unsets all properties that have been specified so far, and resets the FrameBufferProperties structure to its initial empty state.

Definition at line 82 of file frameBufferProperties.cxx.

References get_color_bits(), get_depth_bits(), get_frame_buffer_mode(), has_color_bits(), has_depth_bits(), has_frame_buffer_mode(), set_color_bits(), set_depth_bits(), and set_frame_buffer_mode().

void FrameBufferProperties::clear_color_bits  )  [inline]
 

Removes the color_bits specification from the properties.

Definition at line 265 of file frameBufferProperties.I.

void FrameBufferProperties::clear_depth_bits  )  [inline]
 

Removes the depth_bits specification from the properties.

Definition at line 199 of file frameBufferProperties.I.

References _color_bits, _specified, and S_color_bits.

void FrameBufferProperties::clear_frame_buffer_mode  )  [inline]
 

Removes the frameBuffer_mode specification from the properties.

Definition at line 137 of file frameBufferProperties.I.

References _specified, INLINE, and S_depth_bits.

int FrameBufferProperties::get_color_bits  )  const [inline]
 

Returns the number of bits specified for the color buffer.

Definition at line 235 of file frameBufferProperties.I.

Referenced by clear().

int FrameBufferProperties::get_depth_bits  )  const [inline]
 

Returns the number of bits specified for the depth buffer.

Definition at line 169 of file frameBufferProperties.I.

References _color_bits, and INLINE.

Referenced by clear().

int FrameBufferProperties::get_frame_buffer_mode  )  const [inline]
 

Returns the set of graphics properties that are in effect for the window.

This will be the union of the corresponding bits from FrameBufferMode.

Definition at line 106 of file frameBufferProperties.I.

References _frame_buffer_mode, _specified, and S_frame_buffer_mode.

Referenced by add_properties(), and clear().

bool FrameBufferProperties::has_color_bits  )  const [inline]
 

Returns true if the number of bits for the color buffer has been specified, false otherwise.

Definition at line 250 of file frameBufferProperties.I.

Referenced by clear().

bool FrameBufferProperties::has_depth_bits  )  const [inline]
 

Returns true if the number of bits for the depth buffer has been specified, false otherwise.

Definition at line 184 of file frameBufferProperties.I.

References _specified, INLINE, and S_color_bits.

Referenced by clear().

bool FrameBufferProperties::has_frame_buffer_mode  )  const [inline]
 

Returns true if the frameBuffer mode has been specified, false otherwise.

Definition at line 122 of file frameBufferProperties.I.

References _depth_bits, and INLINE.

Referenced by add_properties(), and clear().

bool FrameBufferProperties::is_any_specified  )  const [inline]
 

Returns true if any properties have been specified, false otherwise.

Definition at line 69 of file frameBufferProperties.I.

References _frame_buffer_mode, _specified, and S_frame_buffer_mode.

bool FrameBufferProperties::operator!= const FrameBufferProperties &  other  )  const [inline]
 

Definition at line 54 of file frameBufferProperties.I.

References _specified, and INLINE.

void FrameBufferProperties::operator= const FrameBufferProperties &  copy  ) 
 

Definition at line 45 of file frameBufferProperties.cxx.

References _color_bits, _depth_bits, _flags, _frame_buffer_mode, and _specified.

bool FrameBufferProperties::operator== const FrameBufferProperties &  other  )  const
 

Definition at line 61 of file frameBufferProperties.cxx.

References _color_bits, _depth_bits, _flags, _frame_buffer_mode, and _specified.

Referenced by ~FrameBufferProperties().

void FrameBufferProperties::output ostream &  out  )  const
 

Sets any properties that are explicitly specified in other on this object.

Leaves other properties unchanged.

Definition at line 128 of file frameBufferProperties.cxx.

References FM_depth.

void FrameBufferProperties::set_color_bits int  color_bits  )  [inline]
 

Specifies the minimum number of bits that are required for all three channels of the color buffer.

That is, this is the per-channel color requirement times three.

Definition at line 219 of file frameBufferProperties.I.

Referenced by clear().

void FrameBufferProperties::set_depth_bits int  depth_bits  )  [inline]
 

Specifies the minimum number of bits that are required for the depth buffer.

Definition at line 153 of file frameBufferProperties.I.

References _depth_bits.

Referenced by clear().

void FrameBufferProperties::set_frame_buffer_mode int  frameBuffer_mode  )  [inline]
 

Specifies the set of graphics properties that are required for the context associated with the window.

This should be the union of the appropriate bits defined in FrameBufferMode.

Definition at line 88 of file frameBufferProperties.I.

References _specified, INLINE, and S_frame_buffer_mode.

Referenced by clear().


Member Data Documentation

int FrameBufferProperties::_color_bits [private]
 

Definition at line 108 of file frameBufferProperties.h.

Referenced by clear_depth_bits(), FrameBufferProperties(), get_depth_bits(), operator=(), and operator==().

int FrameBufferProperties::_depth_bits [private]
 

Definition at line 107 of file frameBufferProperties.h.

Referenced by FrameBufferProperties(), has_frame_buffer_mode(), operator=(), operator==(), and set_depth_bits().

int FrameBufferProperties::_flags [private]
 

Definition at line 105 of file frameBufferProperties.h.

Referenced by FrameBufferProperties(), operator=(), and operator==().

int FrameBufferProperties::_frame_buffer_mode [private]
 

Definition at line 106 of file frameBufferProperties.h.

Referenced by FrameBufferProperties(), get_frame_buffer_mode(), is_any_specified(), operator=(), and operator==().

int FrameBufferProperties::_specified [private]
 

Definition at line 104 of file frameBufferProperties.h.

Referenced by clear_depth_bits(), clear_frame_buffer_mode(), FrameBufferProperties(), get_frame_buffer_mode(), has_depth_bits(), is_any_specified(), operator!=(), operator=(), operator==(), and set_frame_buffer_mode().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:50:45 2003 for Panda by doxygen1.3