15 #include "graphicsThreadingModel.h"
51 if (!model.empty() && model[0] ==
'-') {
53 _cull_sorting =
false;
56 size_t slash = model.find(
'/', start);
57 if (slash == string::npos) {
58 _cull_name = model.substr(start);
60 _cull_name = model.substr(start, slash - start);
61 _draw_name = model.substr(slash + 1);
88 void GraphicsThreadingModel::
90 if (_cull_name.empty()) {
95 if (!_cull_sorting || _draw_name.empty()) {
96 _draw_name = _cull_name;
99 if (_draw_name == _cull_name) {
100 _draw_stage = _cull_stage;
102 _draw_stage = _cull_stage + 1;
string get_model() const
Returns the string that describes the threading model.
GraphicsThreadingModel(const string &model=string())
The threading model accepts a string representing the names of the two threads that will process cull...
bool get_cull_sorting() const
Returns true if the model involves a separate cull pass, or false if culling happens implicitly...
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 graphic...