-
Notifications
You must be signed in to change notification settings - Fork 544
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
Things that I think could be improved in gfx-rs #216
Comments
This is an impressive list! Let me address some of its points (other points I mainly agree with):
We have #210, which will show multi-threading and working with frames. Anything else you think requires explicit coverage?
This is arguable. All examples use only
Users may find the second one useful, but I agree on the
I wish we had this level of convenience, but it's by far not trivial to provide this as an alternative that is only suitable for single-threaded execution.
This is possible, but there are more types. How do you infer
Because resetting the draw list avoids re-allocating the memory. Besides, we are going to have the
You are only supposed to use it once when the program is linked. Today, we have a convenient I realize that this needs to be demonstrated and explained. We've been in flux, and my article draft on shader parameters is still a draft. I'll update it once we stabilize more. |
Thanks a bunch for the feedback! |
Fixed by #240 |
In
Ideally most OpenGL features should be covered by examples, but this is a lot of work and is not urgent. |
To be fair, I believe we did consider that before implementing the texturing support, because that's pretty much what Claymore had. I can't tell you why we ended up settling with an explicit kind in |
I chose to do the explicit kind because I feel it is less error-prone and is easier to read/understand. |
Moved into a separate issue #288 for RAII. |
Covered by #145 |
This becomes slightly obsolete, and a lot of points are already done. Lowering the priority. |
Not planning on doing these changes in pre-ll |
216: Add Naïve Debug Derives Where Possible r=kvark a=arashikou This adds `#[derive(Debug)]` to all public structs and enums possible. This also required adding it to some private types that they transitively depend on. However, the following types depend on types from external crates that do not implement Debug: * `device::Device` * `hub::Hub` * `swap_chain::Surface` * `swap_chain::SwapChain` To support these types, we would need to use either custom `Debug` impls or something like [Derivative](https://mcarton.github.io/rust-derivative/). This helps improve the situation in gfx-rs#76. Co-authored-by: John W. Bruce <arashikou@gmail.com>
226: Tracking Rewrite r=grovesNL a=kvark Fixes gfx-rs#44 The idea is to support independent tracking of sub-resources. Today, this is needed for textures, which can have individual layers and mipmap levels in different states at a time. Tomorrow, this will be needed for buffer sub-ranges. The intent to hack it in grew into a complete rewrite of the tracker... The new approach is cleaner in a few places (e.g. `TrackPermit` is gone), but the implementation is obviously more complex. I tried to separate the levels from each other (see `ResourceState` and `RangedStates`) to fight complexity, but it requires a whole lot of testing infrastructure to be solid. Also regresses gfx-rs#216 a bit, cc @arashikou : tracker is a relatively complex structure. I somehow doubt it's useful to look at it in debug spew. We may need to implement `Debug` manually for it before re-adding `Debug` derives on passes and command buffers. TODO: - [x] documentation of tracking types - [x] unit tests for tracking logic - [x] actual testing with existing apps, ensure no regressions - [x] write a mipmap generation example Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all of the gfx-hal types that wgpu depends on implement Debug. Thus, some types that could not derive Debug in gfx-rs#216 can now derive Debug. This patch also adds Debug implementations for a few types that were recently added to wgpu. Fixes gfx-rs#76.
223: Derive Debug for All Remaining Public Types r=kvark a=arashikou With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all of the gfx-hal types that wgpu depends on implement `Debug`. Thus, some types that could not derive `Debug` in gfx-rs#216 can now derive `Debug`. This patch also adds `Debug` implementations for a few types that were recently added to wgpu. Fixes gfx-rs#76. Co-authored-by: John W. Bruce <arashikou@gmail.com>
@kvark encouraged me to post a mega-issue about things that I don't like with gfx-rs, so here it is.
Documentation
device
,render
andgfx
and what each of these crates is supposed to do. It took me some time to figure out that onlygfx
is supposed to be used.FrontEnd
orDrawList
), it should be documented how to create one.#[doc(hidden)]
. This includesHandle
andVertexFormat
.gfx-rs
users will be experts in 3D rendering.[[f32, ..4], ..4]
is supposed to be row-major or column-major.Frame
type is too confusing. The front end returns "the main frame", but frames can be created withFrame::new()
. The docs say it's "the result of rendering", but I'd expect the pixel data to be in there if it was the case. What exactly is a frame?Mesh
.Shell
word before when talking about 3D rendering. This word is confusing.Safety
type Foo = Bar
in favor ofstruct Foo(Bar)
.delete_*
functions. RAII should handle everything.&[(f32, f32, f32)]
or&[[f32, ..3]]
, you can infer that it has 3gl_float
components.create_texture
, then it's a 1D texture.DrawList
have areset
method? The user should just create a new list instead of resetting it.U16
orU32
enum value.create_frame_buffer
should not return au32
.Mesh
should contain theBufferHandle
to ensure that the buffer is not destroyed as long as the mesh exists.Usability
connect_program
not part of the draw list? More often than not, you have amatrix
uniform which must be updated at each frame. The fact that it's not part of the draw list makes draw list not reusable because you need to recreate a newCustomShell
object at each frame.ParamDirectory
should be much easier to create.The text was updated successfully, but these errors were encountered: