Skip to content

Commit

Permalink
Add baseVertex (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero authored and dnfield committed Apr 27, 2022
1 parent e7f9073 commit ba1ecb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion impeller/renderer/backend/metal/render_pass_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static bool Bind(PassBindingsCache& pass,
indexBuffer:mtl_index_buffer
indexBufferOffset:command.index_buffer.range.offset
instanceCount:1u
baseVertex:0u
baseVertex:command.base_vertex
baseInstance:0u];
}
return true;
Expand Down
4 changes: 4 additions & 0 deletions impeller/renderer/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ struct Command {
CullMode cull_mode = CullMode::kNone;
uint32_t stencil_reference = 0u;
//----------------------------------------------------------------------------
/// The offset used when indexing into the vertex buffer.
///
uint64_t base_vertex = 0u;
//----------------------------------------------------------------------------
/// The viewport coordinates that the rasterizer linearly maps normalized
/// device coordinates to.
/// If unset, the viewport is the size of the render target with a zero
Expand Down

0 comments on commit ba1ecb6

Please sign in to comment.