Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-20 Thread Danny Arends via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 15:53:02 UTC, ryuukk_ wrote: Nuklear works with D (ImportC) out of the box, you don't need any binding, that's what i'm using in my game nk.c ``` // add other configs you need #define NK_INCLUDE_VERTEX_BUFFER_OUTPUT #define NK_IMPLEMENTATION #include "nuklear

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-20 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 20/02/2025 10:58 PM, Danny Arends wrote: On Wednesday, 19 February 2025 at 15:53:02 UTC, ryuukk_ wrote: Nuklear works with D (ImportC) out of the box, you don't need any binding, that's what i'm using in my game nk.c ``` // add other configs you need #define NK_INCLUDE_VERTEX_BUFFER_OUTPU

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-20 Thread Danny Arends via Digitalmars-d-learn
On Thursday, 20 February 2025 at 06:53:26 UTC, IchorDev wrote: On Wednesday, 19 February 2025 at 15:21:19 UTC, Danny Arends wrote: I've tried several different bindings to IMgui, however, none seem to work and seem abandoned to me (the most recent updated one 'bindbc-imgui' was updated 3 years

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-20 Thread Danny Arends via Digitalmars-d-learn
On Thursday, 20 February 2025 at 10:02:31 UTC, Richard (Rikki) Andrew Cattermole wrote: On 20/02/2025 10:58 PM, Danny Arends wrote: [...] That's not -betterC, that's ImportC, different feature. This one has a similar report: https://github.com/dlang/dmd/issues/20470 Right, I always get th

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-20 Thread realhet via Digitalmars-d-learn
On Thursday, 20 February 2025 at 03:54:28 UTC, Jonathan M Davis wrote: On Wednesday, February 19, 2025 7:48:48 PM MST Jonathan M Davis via Digitalmars-d-learn wrote: So you should probably either just make your code operate on ranges of dchar Thank You for the deep explanation! This thing che

What does a cast really do?

2025-02-20 Thread Quirin Schroll via Digitalmars-d-learn
It seems a cast does more than change the static type and VRP. ```d void foo(uint) { } int x = -1; foo(x); // compiles (debatable) foo(long(x)); // compiles(!) foo(cast(long)x); // compiles(!) foo((() => cast(long)x)()); // Error: foo is not callable using argument types […] ``` Why do the lat

Re: What does a cast really do?

2025-02-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 20, 2025 6:02:26 PM MST Quirin Schroll via Digitalmars-d-learn wrote: > It seems a cast does more than change the static type and VRP. > ```d > void foo(uint) { } > > int x = -1; > foo(x); // compiles (debatable) > foo(long(x)); // compiles(!) > foo(cast(long)x); // compiles(

Intro to calling C libraries

2025-02-20 Thread Ian via Digitalmars-d-learn
Hi, What is the recommended documentation or introductory material on how to call C libraries from D? I've seen it done in GtkD (for GTK3) and I have heard of -betterC, but it's all a little overwhelming. (I'm an experienced C programmer but new to D) Cheers, Ian

Re: Gtkd questions

2025-02-20 Thread Ian via Digitalmars-d-learn
On Sunday, 22 September 2024 at 15:46:48 UTC, Dejan Lekic wrote: On Sunday, 22 September 2024 at 15:44:17 UTC, Ian wrote: Ron Tarrant for gtkcoding.com by the way!) Is there a place where I can ask specific Gtkd questions? I came across some For many years this has been the main place to ask G

Re: Intro to calling C libraries

2025-02-20 Thread Lance Bachmeier via Digitalmars-d-learn
On Thursday, 20 February 2025 at 20:09:29 UTC, Ian wrote: Hi, What is the recommended documentation or introductory material on how to call C libraries from D? I've seen it done in GtkD (for GTK3) and I have heard of -betterC, but it's all a little overwhelming. (I'm an experienced C programm

Re: Gtkd questions

2025-02-20 Thread Sergey via Digitalmars-d-learn
On Sunday, 22 September 2024 at 15:44:17 UTC, Ian wrote: Hi, I have started using Gtkd for my first D app. (Many thanks to Ron Tarrant for gtkcoding.com by the way!) Is there a place where I can ask specific Gtkd questions? I came across some post at some point mentioning they may have anothe

Re: Intro to calling C libraries

2025-02-20 Thread Ian via Digitalmars-d-learn
On Thursday, 20 February 2025 at 21:05:40 UTC, Lance Bachmeier wrote: Normally, you should be using ImportC. Look at the quick example from the spec: https://dlang.org/spec/importc.html#examples The first line of hello.c looks like this: ``` #include ``` When ImportC compiles a C file, it

Re: Gtkd questions

2025-02-20 Thread Ian via Digitalmars-d-learn
On Thursday, 20 February 2025 at 21:24:29 UTC, Sergey wrote: On Sunday, 22 September 2024 at 15:44:17 UTC, Ian wrote: Hi, I have started using Gtkd for my first D app. (Many thanks to Ron Tarrant for gtkcoding.com by the way!) Is there a place where I can ask specific Gtkd questions? I came a