michaelfairley / rust-imgui-opengl-renderer

OpenGL (3+) rendering for imgui-rs
37 stars 32 forks source link

SFML #10

Closed DoctorVWA closed 4 years ago

DoctorVWA commented 4 years ago

Hello, is it possible to use this with rust SFML? there isn't a function in sfml for getting proc address, but it can create a opengl context.

If you are wondering why I don't test it myself, that's because my SFML game runs on opengl 2.1, and my computer can't run open gl 3+, there's an open issue open for this as well, I just want to know if I can use it with sfml, and if it's worth forking it and trying myself to get it working on opengl 2.x.

Thanks ;)

michaelfairley commented 4 years ago

It looks like SFML's Context has a getFunction, but it's not exposed from the Rust wrapper :confused:. With that method, this library should work fine with SFML.

DoctorVWA commented 4 years ago

Hello, really thanks for the quick reply, I didn't saw it before, ~one question, the string passed in the callback is exactly what?~ I see this is used for gl crate here

Also I saw there in sfml-rust issues this milestone, looks likes they implemented Context on it, but didn't exposed this function, I gonna try to find someone who exposed this method, and send it here for further people trying to use your's crate.

Keep it up! Find people who cares about issues on github is a hard task sometimes.

DoctorVWA commented 4 years ago

Actually I belive I found an workaround for it, I was reading the code of your crate and saw this function build_rgba32_texture, there's this function on sfml, that maybe can be used for this part, but for the rest, I don't see any workaround without actually using the gl context.

DoctorVWA commented 4 years ago

Really thanks for the help, looks like it's a root problem with the bindings of SFML, they use CSFML, which doesn't implement the getFunction method on the context, I really appreciate your help, gonna close the issue for now, if I manage to get it working, I'll open a PR for opengl 2.0, thanks for everything, bye :)

oops, I didn't saw it, looks like there's a PR: https://github.com/SFML/CSFML/pull/148