Update Model::renderCore to use RenderArgs

This commit is contained in:
Ryan Huffman 2015-05-22 16:10:43 -07:00
parent 47d9cf42c5
commit 8380eec03b
2 changed files with 5 additions and 3 deletions

View file

@ -777,15 +777,17 @@ bool Model::render(RenderArgs* renderArgs, float alpha) {
}
renderSetup(renderArgs);
return renderCore(alpha, renderArgs->_renderMode, renderArgs);
return renderCore(renderArgs, alpha);
}
bool Model::renderCore(float alpha, RenderMode mode, RenderArgs* args) {
bool Model::renderCore(RenderArgs* args, float alpha) {
PROFILE_RANGE(__FUNCTION__);
if (!_viewState) {
return false;
}
auto mode = args->_renderMode;
// Let's introduce a gpu::Batch to capture all the calls to the graphics api
_renderBatch.clear();
gpu::Batch& batch = _renderBatch;

View file

@ -371,7 +371,7 @@ private:
// helper functions used by render() or renderInScene()
void renderSetup(RenderArgs* args);
bool renderCore(float alpha, RenderArgs::RenderMode mode, RenderArgs* args);
bool renderCore(RenderArgs* args, float alpha);
int renderMeshes(gpu::Batch& batch, RenderArgs::RenderMode mode, bool translucent, float alphaThreshold,
bool hasLightmap, bool hasTangents, bool hasSpecular, bool isSkinned, bool isWireframe, RenderArgs* args = NULL,
bool forceRenderMeshes = false);