sokol-d: Static Struct

Matheus Catarino matheus-catarino at hotmail.com
Fri Feb 2 15:14:39 UTC 2024


On Saturday, 30 December 2023 at 19:27:08 UTC, Matheus Catarino 
wrote:
> Hi everyone. 👋
>
>
> Currently I'm working on D binding for sokol project (truly a 
> dual bindgen [sokol-tools, sokol-header]) which could be merged 
> into the upstream project.
>
>
> Up to now, my "ideal" configuration has been to run all the 
> ported examples (from other supported bindings) on Drt or 
> betterC provided @safe has DIP1000 enabled (not obligatory).
>
>
> Except for the "clear" example (no have structs) works, the 
> rest of the examples have partial execution, without 2D/3D 
> animations, like the original ported examples.
>
> e.g.:
> https://github.com/kassane/sokol-d/blob/main/src/examples/sgl_context.d
>

Finally fixed!! Works in, linux/macos/windows/wasm32(need emsdk)

I was having trouble with the floating/double init (nan) and 
solved this issue by giving default values to structs fields.

![](https://github.com/kassane/sokol-d/assets/6756180/198f1b6b-26c0-4dfc-b372-533df1bc77d3)


More information about the Digitalmars-d-learn mailing list