Open nukep opened 9 years ago
I'd say yeah. As long as we mark things unsafe, and document them as 'Don't use this unless you know what you're doing!', then it makes sense.
How about from_ll()
as well, for raw -> wrapped conversions? https://github.com/xsleonard/rust-sdl2_image/pull/28 needs to interop with textures and obtain the rust-sdl2
types from raw pointers.
Definitely.
Back when "refactoring", I inadvertently broke the rust-sdl2_image library by removing the raw accessor from
Renderer
: https://github.com/AngryLawyer/rust-sdl2/commit/6070bfb19c3c75ee3bcd015c4af510c6ca17666d#commitcomment-9502773Turns out the raw accessors are useful for more than just internal use.
For anyone extending
rust-sdl2
to provide functionality that's out of scope here (such as sdl2-mixer, sdl2-ttf, etc.), it could be useful to obtain the raw pointers.If we decide to do this, I propose adding a
raw_mut()
accessor as well. This will be especially important for when https://github.com/AngryLawyer/rust-sdl2/issues/108 is addressed):raw_mut()
would accept the immutable&self
to not break things likeRenderer
.Thoughts?