Skip to content

Conversation

@vmarcella
Copy link
Member

When transitioning the engine to use wgpu as opposed to gfx-hal, a lot of shortcuts were taken to get the examples and API working with as minimal changes as possible. This starts refactoring some of the direct wgpu usage out of lambda-rs and implements wrappers over wgpu inside of lambda-rs-platform.

@vmarcella vmarcella changed the title Begin refactoring of rendering Begin refactoring of rendering engine Nov 1, 2025
@vmarcella vmarcella requested a review from Copilot November 1, 2025 23:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a platform abstraction layer for wgpu command encoding and buffer operations. The changes move low-level wgpu details into a new platform module while providing higher-level wrappers for the renderer.

  • Introduces CommandEncoder and RenderPass wrapper types in the platform layer
  • Adds a new buffer module in the platform layer with Buffer and BufferBuilder
  • Refactors the renderer to use these new abstractions instead of raw wgpu types

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 18 comments.

File Description
crates/lambda-rs/src/render/mod.rs Updates imports and refactors command encoder/render pass creation to use new platform wrappers
crates/lambda-rs/src/render/buffer.rs Refactors to delegate buffer creation to platform layer, adds helper methods and tests
crates/lambda-rs-platform/src/wgpu/mod.rs Adds CommandEncoder and RenderPass wrapper types with convenience methods
crates/lambda-rs-platform/src/wgpu/buffer.rs New file implementing platform-level buffer wrapper with builder pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vmarcella vmarcella merged commit baa4ca8 into main Nov 1, 2025
5 checks passed
@vmarcella vmarcella deleted the vmarcella/refactor-rendering branch November 1, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants