-
Notifications
You must be signed in to change notification settings - Fork 2
Begin refactoring of rendering engine #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
CommandEncoderandRenderPasswrapper types in the platform layer - Adds a new
buffermodule in the platform layer withBufferandBufferBuilder - 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.
When transitioning the engine to use
wgpuas opposed togfx-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 oflambda-rsand implements wrappers overwgpuinside oflambda-rs-platform.