Skip to content

Conversation

gustafla
Copy link
Contributor

I disliked that trivial resource bind calls were performing memory allocations, so I changed the gpu API.

However, I want you to take a moment to discuss whether the API should have a newtype for *mut SDL_GPUBuffer that is used for a sys-crate bind-call, just like it has one for SDL_GPUBufferBinding and SDL_GPUTextureSamplerBinding.

In my opinion, there should be an opaque newtype for that, and the API shouldn't just use the raw pointer that can be obtained from Buffer::raw() and Texture::raw().

@gustafla
Copy link
Contributor Author

Ah, I noticed @quaternic has created a refactoring PR for the whole API. Should we work together on this? I don't want any unnecessary memory allocations in my GPU API wrapper crate.

@gustafla
Copy link
Contributor Author

gustafla commented Jun 9, 2025

I'm closing this for now in favor of #158

@gustafla gustafla closed this Jun 9, 2025
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.

1 participant