545 lines · 17.5 KB · C++
RawDownload
  void ModelMeshPartPayload::render(RenderArgs* args) const {    PerformanceTimer perfTimer("ModelMeshPartPayload::render");     if (!_model->_readyWhenAdded || !_model->_isVisible) {        return; // bail asap    }     gpu::Batch& batch = *(args->_batch);     if (!getShapeKey().isValid()) {        return;    }     auto locations =  args->_pipeline->locations;    assert(locations);     // Bind the model transform and the skinCLusterMatrices if needed    bool canCauterize = args->_renderMode != RenderArgs::SHADOW_RENDER_MODE;    _model->updateClusterMatrices(_transform.getTranslation(), _transform.getRotation());    bindTransform(batch, locations, canCauterize);     //Bind the index buffer and vertex buffer and Blend shapes if needed    bindMesh(batch);     // apply material properties    bindMaterial(batch, locations);     if (args) {        args->_details._materialSwitches++;    }     // Draw!    {        PerformanceTimer perfTimer("batch.drawIndexed()");        drawCall(batch);    }     if (args) {        const int INDICES_PER_TRIANGLE = 3;        args->_details._trianglesRendered += _drawPart._numIndices / INDICES_PER_TRIANGLE;    }} 

Lines 501–545 of 545. Previous lines

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t