-----------------------------------------------------------------------
| 1093 | } |
| 1094 | //----------------------------------------------------------------------- |
| 1095 | void RenderSystem::_render( const v1::RenderOperation &op ) |
| 1096 | { |
| 1097 | // Update stats |
| 1098 | size_t primCount = op.useIndexes ? op.indexData->indexCount : op.vertexData->vertexCount; |
| 1099 | |
| 1100 | size_t trueInstanceNum = std::max<size_t>( op.numberOfInstances, 1 ); |
| 1101 | primCount *= trueInstanceNum; |
| 1102 | |
| 1103 | // account for a pass having multiple iterations |
| 1104 | if( mCurrentPassIterationCount > 1 ) |
| 1105 | primCount *= mCurrentPassIterationCount; |
| 1106 | mCurrentPassIterationNum = 0; |
| 1107 | |
| 1108 | switch( op.operationType ) |
| 1109 | { |
| 1110 | case OT_TRIANGLE_LIST: |
| 1111 | mMetrics.mFaceCount += ( primCount / 3u ); |
| 1112 | break; |
| 1113 | case OT_TRIANGLE_STRIP: |
| 1114 | case OT_TRIANGLE_FAN: |
| 1115 | mMetrics.mFaceCount += ( primCount - 2u ); |
| 1116 | break; |
| 1117 | default: |
| 1118 | break; |
| 1119 | } |
| 1120 | |
| 1121 | mMetrics.mVertexCount += op.vertexData->vertexCount * trueInstanceNum; |
| 1122 | mMetrics.mBatchCount += mCurrentPassIterationCount; |
| 1123 | |
| 1124 | // sort out clip planes |
| 1125 | // have to do it here in case of matrix issues |
| 1126 | if( mClipPlanesDirty ) |
| 1127 | { |
| 1128 | setClipPlanesImpl( mClipPlanes ); |
| 1129 | mClipPlanesDirty = false; |
| 1130 | } |
| 1131 | } |
| 1132 | //----------------------------------------------------------------------- |
| 1133 | /*void RenderSystem::_render( const VertexArrayObject *vao ) |
| 1134 | { |
no test coverage detected