mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Rename RHI update_buffer_contents to update_buffer
Consistency with update_texture
This commit is contained in:
parent
e088577924
commit
ba5ee56b8e
7 changed files with 11 additions and 11 deletions
|
|
@ -123,13 +123,13 @@ void BlitRectPass::transfer(Rhi& rhi, Handle<TransferContext> ctx)
|
|||
{
|
||||
if (quad_vbo_needs_upload_ && quad_vbo_)
|
||||
{
|
||||
rhi.update_buffer_contents(ctx, quad_vbo_, 0, tcb::as_bytes(tcb::span(kVerts)));
|
||||
rhi.update_buffer(ctx, quad_vbo_, 0, tcb::as_bytes(tcb::span(kVerts)));
|
||||
quad_vbo_needs_upload_ = false;
|
||||
}
|
||||
|
||||
if (quad_ibo_needs_upload_ && quad_ibo_)
|
||||
{
|
||||
rhi.update_buffer_contents(ctx, quad_ibo_, 0, tcb::as_bytes(tcb::span(kIndices)));
|
||||
rhi.update_buffer(ctx, quad_ibo_, 0, tcb::as_bytes(tcb::span(kIndices)));
|
||||
quad_ibo_needs_upload_ = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,10 +156,10 @@ void ImguiPass::transfer(Rhi& rhi, Handle<TransferContext> ctx)
|
|||
}
|
||||
|
||||
tcb::span<ImDrawVert> vert_span = tcb::span(im_list->VtxBuffer.Data, im_list->VtxBuffer.size());
|
||||
rhi.update_buffer_contents(ctx, vbo, 0, tcb::as_bytes(vert_span));
|
||||
rhi.update_buffer(ctx, vbo, 0, tcb::as_bytes(vert_span));
|
||||
|
||||
tcb::span<ImDrawIdx> index_span = tcb::span(im_list->IdxBuffer.Data, im_list->IdxBuffer.size());
|
||||
rhi.update_buffer_contents(ctx, ibo, 0, tcb::as_bytes(index_span));
|
||||
rhi.update_buffer(ctx, ibo, 0, tcb::as_bytes(index_span));
|
||||
|
||||
// Uniform sets
|
||||
std::array<UniformVariant, 1> g1_uniforms = {
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ void PostprocessWipePass::transfer(Rhi& rhi, Handle<TransferContext> ctx)
|
|||
|
||||
if (upload_vbo_)
|
||||
{
|
||||
rhi.update_buffer_contents(ctx, vbo_, 0, tcb::as_bytes(tcb::span(kPostprocessVerts)));
|
||||
rhi.update_buffer(ctx, vbo_, 0, tcb::as_bytes(tcb::span(kPostprocessVerts)));
|
||||
upload_vbo_ = false;
|
||||
}
|
||||
|
||||
if (upload_ibo_)
|
||||
{
|
||||
rhi.update_buffer_contents(ctx, ibo_, 0, tcb::as_bytes(tcb::span(kPostprocessIndices)));
|
||||
rhi.update_buffer(ctx, ibo_, 0, tcb::as_bytes(tcb::span(kPostprocessIndices)));
|
||||
upload_ibo_ = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -832,8 +832,8 @@ void TwodeePass::transfer(Rhi& rhi, Handle<TransferContext> ctx)
|
|||
|
||||
tcb::span<const std::byte> vertex_data = tcb::as_bytes(tcb::span(orig_list.vertices));
|
||||
tcb::span<const std::byte> index_data = tcb::as_bytes(tcb::span(orig_list.indices));
|
||||
rhi.update_buffer_contents(ctx, merged_list.vbo, 0, vertex_data);
|
||||
rhi.update_buffer_contents(ctx, merged_list.ibo, 0, index_data);
|
||||
rhi.update_buffer(ctx, merged_list.vbo, 0, vertex_data);
|
||||
rhi.update_buffer(ctx, merged_list.ibo, 0, index_data);
|
||||
|
||||
// Update the binding sets for each individual merged command
|
||||
VertexAttributeBufferBinding vbos[] = {{0, merged_list.vbo}};
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ void GlCoreRhi::destroy_buffer(rhi::Handle<rhi::Buffer> handle)
|
|||
disposal_.push_back([this, name] { gl_->DeleteBuffers(1, &name); });
|
||||
}
|
||||
|
||||
void GlCoreRhi::update_buffer_contents(
|
||||
void GlCoreRhi::update_buffer(
|
||||
rhi::Handle<TransferContext> ctx,
|
||||
rhi::Handle<rhi::Buffer> handle,
|
||||
uint32_t offset,
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ public:
|
|||
virtual Handle<TransferContext> begin_transfer() override;
|
||||
virtual void end_transfer(Handle<TransferContext> handle) override;
|
||||
|
||||
virtual void update_buffer_contents(
|
||||
virtual void update_buffer(
|
||||
Handle<TransferContext> ctx,
|
||||
Handle<Buffer> buffer,
|
||||
uint32_t offset,
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ struct Rhi
|
|||
virtual void end_transfer(Handle<TransferContext> handle) = 0;
|
||||
|
||||
// Transfer Context functions
|
||||
virtual void update_buffer_contents(
|
||||
virtual void update_buffer(
|
||||
Handle<TransferContext> ctx,
|
||||
Handle<Buffer> buffer,
|
||||
uint32_t offset,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue