texture_stack.reserve(32);
}
-Renderer::~Renderer()
-{
-}
-
void Renderer::begin()
{
if(current_state)
throw invalid_operation("Renderer::begin");
- state_stack.push_back(State());
+ state_stack.emplace_back();
current_state = &state_stack.back();
+
+ RendererBackend::begin();
+
add_shader_data(standard_shdata);
}
if(!current_state || state_stack.size()>1)
throw invalid_operation("Renderer::end");
+ RendererBackend::end();
+
current_state = 0;
state_stack.clear();
texture_stack.clear();
shdata_stack.clear();
-
- commands.use_pipeline(0);
}
void Renderer::push_state()
break;
}
- texture_stack.push_back(BoundTexture());
+ texture_stack.emplace_back();
BoundTexture &bound_tex = texture_stack.back();
bound_tex.tag = tag;
bound_tex.texture = tex;