Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RenderingModeSingleton< RenderingModeSelectionPolicy > Class Template Reference

A singleton class that keeps track of the rendering mode to be used by all instances of a particular gTexture. More...

#include <rendering_mode.H>

Collaboration diagram for RenderingModeSingleton< RenderingModeSelectionPolicy >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool supported ()
 Indicates whether any of the available rendering modes are supported on the current system.
void setup_for_drawing_outside_dl (const Patch *patch)
 
Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

void setup_for_drawing_inside_dl (const Patch *patch)
 
void after_drawing_outside_dl (const Patch *patch)
 
Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

void after_drawing_inside_dl (const Patch *patch)
 
GLStripCBget_new_strip_cb ()
 
Note:
The returned GLStripCB pointer should be deleted by the caller when it is done being used.


Static Public Member Functions

static RenderingModeSingleton<
RenderingModeSelectionPolicy > & 
Instance ()

Private Member Functions

 RenderingModeSingleton ()
 RenderingModeSingleton (const RenderingModeSingleton &other)
 ~RenderingModeSingleton ()
RenderingModeSingletonoperator= (const RenderingModeSingleton &rhs)

Private Attributes

RenderingModemode

Detailed Description

template<typename RenderingModeSelectionPolicy>
class RenderingModeSingleton< RenderingModeSelectionPolicy >

A singleton class that keeps track of the rendering mode to be used by all instances of a particular gTexture.

This class determines which rendering modes are available for use and picks the best one based on the RenderingModeSelectionPolicy. This policy should be a class with a public static class method called SelectRenderingMode that takes no arguments and returns a pointer to a newly allocated rendering mode (or 0 if none of the available rendering modes can be used).

Definition at line 89 of file rendering_mode.H.


Constructor & Destructor Documentation

template<typename RenderingModeSelectionPolicy>
RenderingModeSingleton< RenderingModeSelectionPolicy >::RenderingModeSingleton  )  [inline, private]
 

Definition at line 146 of file rendering_mode.H.

template<typename RenderingModeSelectionPolicy>
RenderingModeSingleton< RenderingModeSelectionPolicy >::RenderingModeSingleton const RenderingModeSingleton< RenderingModeSelectionPolicy > &  other  )  [private]
 

template<typename RenderingModeSelectionPolicy>
RenderingModeSingleton< RenderingModeSelectionPolicy >::~RenderingModeSingleton  )  [inline, private]
 

Definition at line 154 of file rendering_mode.H.

References RenderingModeSingleton< RenderingModeSelectionPolicy >::mode.


Member Function Documentation

template<typename RenderingModeSelectionPolicy>
void RenderingModeSingleton< RenderingModeSelectionPolicy >::after_drawing_inside_dl const Patch patch  )  [inline]
 

Definition at line 113 of file rendering_mode.H.

References RenderingMode::after_drawing_inside_dl(), and RenderingModeSingleton< RenderingModeSelectionPolicy >::mode.

template<typename RenderingModeSelectionPolicy>
void RenderingModeSingleton< RenderingModeSelectionPolicy >::after_drawing_outside_dl const Patch patch  )  [inline]
 

Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

Definition at line 109 of file rendering_mode.H.

References RenderingMode::after_drawing_outside_dl(), and RenderingModeSingleton< RenderingModeSelectionPolicy >::mode.

template<typename RenderingModeSelectionPolicy>
GLStripCB* RenderingModeSingleton< RenderingModeSelectionPolicy >::get_new_strip_cb  )  [inline]
 

Note:
The returned GLStripCB pointer should be deleted by the caller when it is done being used.

Definition at line 117 of file rendering_mode.H.

References RenderingMode::get_new_strip_cb(), and RenderingModeSingleton< RenderingModeSelectionPolicy >::mode.

template<typename RenderingModeSelectionPolicy>
RenderingModeSingleton< RenderingModeSelectionPolicy > & RenderingModeSingleton< RenderingModeSelectionPolicy >::Instance  )  [inline, static]
 

Definition at line 136 of file rendering_mode.H.

Referenced by LineDrawingTexture::draw(), and CurvatureTexture::draw().

template<typename RenderingModeSelectionPolicy>
RenderingModeSingleton& RenderingModeSingleton< RenderingModeSelectionPolicy >::operator= const RenderingModeSingleton< RenderingModeSelectionPolicy > &  rhs  )  [private]
 

template<typename RenderingModeSelectionPolicy>
void RenderingModeSingleton< RenderingModeSelectionPolicy >::setup_for_drawing_inside_dl const Patch patch  )  [inline]
 

Definition at line 105 of file rendering_mode.H.

References RenderingModeSingleton< RenderingModeSelectionPolicy >::mode, and RenderingMode::setup_for_drawing_inside_dl().

template<typename RenderingModeSelectionPolicy>
void RenderingModeSingleton< RenderingModeSelectionPolicy >::setup_for_drawing_outside_dl const Patch patch  )  [inline]
 

Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

Definition at line 101 of file rendering_mode.H.

References RenderingModeSingleton< RenderingModeSelectionPolicy >::mode, and RenderingMode::setup_for_drawing_outside_dl().

template<typename RenderingModeSelectionPolicy>
bool RenderingModeSingleton< RenderingModeSelectionPolicy >::supported  )  [inline]
 

Indicates whether any of the available rendering modes are supported on the current system.

Definition at line 97 of file rendering_mode.H.

References RenderingModeSingleton< RenderingModeSelectionPolicy >::mode.


Member Data Documentation

template<typename RenderingModeSelectionPolicy>
RenderingMode* RenderingModeSingleton< RenderingModeSelectionPolicy >::mode [private]
 

Definition at line 122 of file rendering_mode.H.

Referenced by RenderingModeSingleton< RenderingModeSelectionPolicy >::after_drawing_inside_dl(), RenderingModeSingleton< RenderingModeSelectionPolicy >::after_drawing_outside_dl(), RenderingModeSingleton< RenderingModeSelectionPolicy >::get_new_strip_cb(), RenderingModeSingleton< RenderingModeSelectionPolicy >::setup_for_drawing_inside_dl(), RenderingModeSingleton< RenderingModeSelectionPolicy >::setup_for_drawing_outside_dl(), RenderingModeSingleton< RenderingModeSelectionPolicy >::supported(), and RenderingModeSingleton< RenderingModeSelectionPolicy >::~RenderingModeSingleton().


The documentation for this class was generated from the following file:
Generated on Mon Sep 18 11:47:02 2006 for jot by  doxygen 1.4.4