#include <graphicsThreadingModel.h>
Public Member Functions | |
GraphicsThreadingModel (const string &model=string()) | |
The threading model accepts a string representing the names of the two threads that will process cull and draw for the given window, separated by a slash. | |
GraphicsThreadingModel (const GraphicsThreadingModel ©) | |
void | operator= (const GraphicsThreadingModel ©) |
string | get_model () const |
Returns the string that describes the threading model. | |
const string & | get_cull_name () const |
Returns the name of the thread that will handle culling in this model. | |
const string & | get_draw_name () const |
Returns the name of the thread that will handle sending the actual graphics primitives to the graphics API in this model. | |
bool | get_cull_sorting () const |
Returns true if the model involves a separate cull pass, or false if culling happens implicitly, at the same time as draw. | |
bool | is_single_threaded () const |
Returns true if the threading model is a single-threaded model, or false if it involves threads. | |
bool | is_default () const |
Returns true if the threading model is the default, cull-then-draw single-threaded model, or false otherwise. | |
void | output (ostream &out) const |
Private Attributes | |
string | _cull_name |
string | _draw_name |
bool | _cull_sorting |
Definition at line 36 of file graphicsThreadingModel.h.
|
The threading model accepts a string representing the names of the two threads that will process cull and draw for the given window, separated by a slash. The names are completely arbitrary and are used only to differentiate threads. The two names may be the same, meaning the same thread, or each may be the empty string, which represents the previous thread. Thus, for example, "cull/draw" indicates that the window will be culled in a thread called "cull", and drawn in a separate thread called "draw". "draw/draw" or simply "draw/" indicates the window will be culled and drawn in the same thread, "draw". On the other hand, "/draw" indicates the thread will be culled in the main, or app thread, and drawn in a separate thread named "draw". The empty string, "" or "/", indicates the thread will be culled and drawn in the main thread; that is to say, a single-process model. Finally, if the threading model begins with a "-" character, then cull and draw are run simultaneously, in the same thread, with no binning or state sorting. It simplifies the cull process but it forces the scene to render in scene graph order; state sorting and alpha sorting is lost. Definition at line 83 of file graphicsThreadingModel.cxx. |
|
Definition at line 32 of file graphicsThreadingModel.I. References _cull_name, _cull_sorting, _draw_name, and INLINE. |
|
Returns the name of the thread that will handle culling in this model.
Definition at line 65 of file graphicsThreadingModel.I. References _draw_name. |
|
Returns true if the model involves a separate cull pass, or false if culling happens implicitly, at the same time as draw.
Definition at line 99 of file graphicsThreadingModel.I. References _cull_sorting, INLINE, and is_single_threaded(). |
|
Returns the name of the thread that will handle sending the actual graphics primitives to the graphics API in this model.
Definition at line 82 of file graphicsThreadingModel.I. References _cull_name, _draw_name, and INLINE. |
|
Returns the string that describes the threading model. See the constructor. Definition at line 115 of file graphicsThreadingModel.cxx. |
|
Returns true if the threading model is the default, cull-then-draw single-threaded model, or false otherwise.
Definition at line 133 of file graphicsThreadingModel.I. |
|
Returns true if the threading model is a single-threaded model, or false if it involves threads.
Definition at line 116 of file graphicsThreadingModel.I. References threading_model. Referenced by get_cull_sorting(). |
|
Definition at line 48 of file graphicsThreadingModel.I. References _cull_name, and INLINE. |
|
Definition at line 147 of file graphicsThreadingModel.I. |
|
Definition at line 52 of file graphicsThreadingModel.h. Referenced by get_draw_name(), GraphicsThreadingModel(), and operator=(). |
|
Definition at line 54 of file graphicsThreadingModel.h. Referenced by get_cull_sorting(), and GraphicsThreadingModel(). |
|
Definition at line 53 of file graphicsThreadingModel.h. Referenced by get_cull_name(), get_draw_name(), and GraphicsThreadingModel(). |