You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with your Deno SDL2 bindings and was looking to use it as a starting point for porting a project I have been seriously committed to for the last year and a half plus. It is built on the JavaScript Canvas API so the general concepts are familiar and approachable for me.
However, I have been trying my hardest to get a working example of the Font.renderSolid/TTF_RenderText_Solid using the latest release v5.0. I saw the only other example that was using the text rendering was the project that recreated the Chrome Dinosaur jumping game but this was using the Canvas.renderFont that existing in the SDL API versions previous to 5. I repeatedly get issues with buffer/pointer types but believed I had resolved these as I read about the FFI pointer/buffer changes that were supposed to come with Deno 1.29. I can only see it in v3 and prior and there have been no other projects at this time that I could find a reproducible example to emulate.
Was hoping you might be able to point me in the right direction as if v5.0 doesn't work then I believe I would have to revert to v3 of deno_sdl2
Goal was to render a simple "Hello World" string in the center of the window/canvas. If I am able to do the font, I would be able to port my entire project rather quickly but this is the one major feature I am truly struggling with.
This code results in the error "error: Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt
const raw = sdl2Font.symbols.TTF_RenderText_Solid("
I've been playing around with your Deno SDL2 bindings and was looking to use it as a starting point for porting a project I have been seriously committed to for the last year and a half plus. It is built on the JavaScript Canvas API so the general concepts are familiar and approachable for me.
However, I have been trying my hardest to get a working example of the Font.renderSolid/TTF_RenderText_Solid using the latest release v5.0. I saw the only other example that was using the text rendering was the project that recreated the Chrome Dinosaur jumping game but this was using the Canvas.renderFont that existing in the SDL API versions previous to 5. I repeatedly get issues with buffer/pointer types but believed I had resolved these as I read about the FFI pointer/buffer changes that were supposed to come with Deno 1.29. I can only see it in v3 and prior and there have been no other projects at this time that I could find a reproducible example to emulate.
Was hoping you might be able to point me in the right direction as if v5.0 doesn't work then I believe I would have to revert to v3 of deno_sdl2
Goal was to render a simple "Hello World" string in the center of the window/canvas. If I am able to do the font, I would be able to port my entire project rather quickly but this is the one major feature I am truly struggling with.
This code results in the error "error: Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt
const raw = sdl2Font.symbols.TTF_RenderText_Solid("
My mod.ts does integrate all changes that were listed here https://github.com/littledivy/deno_sdl2/pull/58/files#diff-e8c3622ccfbed67f4b3058cd4417bf41d066236f49c6f3e63b7c243b584c6734 as well
The text was updated successfully, but these errors were encountered: