mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
Update Model::renderCore to use RenderArgs
This commit is contained in:
parent
47d9cf42c5
commit
8380eec03b
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue