(Littledivy's SDL2 bindings) textures not loading properly
I'm using this script:
With this script:
And using
deno run --unstable-ffi --allow-ffi --allow-env main.ts
(I'm pretty sure) this should render window.png
at position 0, 0 on the screen, however it doesn't do that.
On another note, the .transparent()
method on the WindowBuilder
class doesn't seem to actually make the window transparent.
Could anyone help me to fix this issue?
Thanks in advance.13 Replies
Ive looked at divys sdl binding for a little bit, theyre still quite a bit work in progress. So its likely issues are on the package side. If you need just a window there are other ways but if you need SDL specifically the package needs more work.
Honestly I just need something that doesn't require the web and I'm Very familiar with SDL
I mean I could port the whole thing directly into deno using dlopen, but that may take a while
any reason for wanting to use SDL in deno? instead of something where sdl is well supported?
Honestly I like deno the most out of TypeScript rts and I've tried using sdl with cpp, but I'm not as comfortable with it as with ts
i get that, you could maybe setup something cursed like deno python to sdl
https://deno.land/x/python@0.4.3
contributing to the sdl bindings is also great but yeah it is probably a lot of work
if you do that, feel free to ask me, i have a somewhat full example of openvr to deno ffi here that handles a lot of ffi quirks etc https://github.com/mommysgoodpuppy/OpenVR_TS_Bindings_Deno
It might not take really long to get raw SDL functionality imported but for some reason SDL_Init fails when I try to import it from the library into deno
Honestly probably an easy fix tho if I actually were to think about it
doesnt the divy sdl binding already do sdl init when you use it?
Yeah but i was talking abt manually importing SDL
yeah you can copy paste code from divys bindings
Good point
anyway sdl is big enough that you probably want to make a binding gen eventually
awesome!