Rust-SDL2 / rust-sdl2

SDL2 bindings for Rust
MIT License
2.74k stars 468 forks source link

Add SDL_RenderGeometry functionality #1180

Open SynchroTuner opened 2 years ago

SynchroTuner commented 2 years ago

Hello. SDL_RenderGeometry is added to rendering functionalities in SDL 2.0.18. It can render arbitrary triangle list directly within one call. Are there any plans to add such method to sdl2::render::Canvas?

The method signature may be pub fn geometry(&mut self, texture: &Texture<'_>, vertices: &[Vertex], indices: Option<&[u32]>), and the type Vertex is a wrapper of SDL_Vertex.

kellerkindt commented 2 years ago

Thankfully @moralrecordings has already a WIP implementation that works https://github.com/Rust-SDL2/rust-sdl2/pull/1216

Des-Nerger commented 9 months ago

This functionality is so important for proper texturing in affine space (allowing for things like the smooth skinning in the 2D skeletal animation), why does the upstream wait for so long to accept the @moralrecordings's changes. I have no clue. I thought with v0.36.0 it'd be there.