Skip to content
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

SDL_ComposeCustomBlendMode as part of sdl2 crate? #878

Open
gamecubate opened this issue Mar 28, 2019 · 4 comments
Open

SDL_ComposeCustomBlendMode as part of sdl2 crate? #878

gamecubate opened this issue Mar 28, 2019 · 4 comments

Comments

@gamecubate
Copy link

gamecubate commented Mar 28, 2019

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
Copy link
Member

Cobrand commented Apr 1, 2019

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
Copy link
Author

Alright. Let me try. Thanks for the nudge.

@gamecubate
Copy link
Author

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
Copy link

Opened #1439 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants