Rust-SDL2 / rust-sdl2

SDL2 bindings for Rust
MIT License
2.78k stars 474 forks source link

SDL_ComposeCustomBlendMode as part of sdl2 crate? #878

Open gamecubate opened 5 years ago

gamecubate commented 5 years ago

Forgive the possibly naive question (new -- 1 month -- rustacean) but would it be fathomably possible to bring(/adapt?) SDL's SDL_ComposeCustomBlendMode into the sdl2 crate (as opposed to sdl2_sys) proper?

I need this (creation of specific blend modes not covered by Blend/Add/Mod) and would rather not depend on sdl2_sys (ultimate goal being of building this for all platforms, iOS included).

EDIT: Awesome crate btw.

EDIT'S EDIT: Found a workaround. Please ignore.

Cobrand commented 5 years ago

This function is available in SDL 2.0.6.

This crate was created back when SDL2 was still in 2.0.0 (I think it was even in beta), so it simply wasn't implemented. Feel free to drop a PR and I'll review it if you want to add it!

It's also a good way to experience C bindings with Rust, so don't be afraid of not contributing just because your new :) We are all very welcoming.

Of course if you don't want to implement it, I'll leave this issue open for someone else to pick it up.

gamecubate commented 5 years ago

Alright. Let me try. Thanks for the nudge.

gamecubate commented 5 years ago

I've created local branch bindings-sdl-compose-custom-blend-mode off of your master branch. Will push + create pr once done. If you prefer that I work off a fork let me know and I will adjust.

Hominilupoid commented 1 month ago

Opened #1439 for this.