History

Exposing the drawcall user info just a uint16 right now and use it for the skinning and blendshape

sam gateau committed 8 years ago

Commit 7cf7eaa2 parents 4210ce4 a602bff36 files · +448 −66Browse files

Showing the changes to libraries/render-utils/src/MeshPartPayload.cpp (1 of 36 files). Show all

Unified · Split

libraries/render-utils/src/MeshPartPayload.cpp+5−0
@@ -424,6 +424,11 @@ void ModelMeshPartPayload::render(RenderArgs* args) { · 423 unmodified lines
424 //Bind the index buffer and vertex buffer and Blend shapes if needed424 //Bind the index buffer and vertex buffer and Blend shapes if needed
425 bindMesh(batch);425 bindMesh(batch);
426 426
427 auto drawcallInfo = (uint16_t) ((_isBlendShaped << 0) | (_isSkinned << 1));
428 if (drawcallInfo) {
429 batch.setDrawcallInfo(drawcallInfo);
430 }
431
427 // apply material properties432 // apply material properties
428 if (args->_renderMode != render::Args::RenderMode::SHADOW_RENDER_MODE) {433 if (args->_renderMode != render::Args::RenderMode::SHADOW_RENDER_MODE) {
429 RenderPipelines::bindMaterial(!_drawMaterials.empty() ? _drawMaterials.top().material : DEFAULT_MATERIAL, batch, args->_enableTexturing);434 RenderPipelines::bindMaterial(!_drawMaterials.empty() ? _drawMaterials.top().material : DEFAULT_MATERIAL, batch, args->_enableTexturing);