digitalmars.D.learn - Looking for Feedback (3D engine)
- Danny Arends (23/23) May 15 Hey all,
- Sergey (7/14) May 15 Haven't tried it yet, but from the first glance look what is
- Danny Arends (6/22) May 15 Thanks, I added a screenshot to the readme.
- Sergey (4/9) May 15 Oh it's already kind of a working example.
- Danny Arends (5/15) May 15 Indeed, the basic compile is doing a working example of the
- drug007 (13/16) May 16 ```bash
- drug007 (43/60) May 16 I guess it's because I failed to clone submodule(s)
- Danny Arends (8/9) May 16 Hmm, that is weird, I just added it using a
- Danny Arends (5/6) May 16 Should be solved in commit:
- drug007 (3/10) May 16 Thank you! The problem is fixed. Now I need to install other
- drug007 (20/31) May 16 I installed the dependencies, now I got the fowllowing error
- Danny Arends (8/41) May 16 Thanks, I'll look into that one never had issues assigning to the
- drug007 (18/28) May 16 ```bash
- Danny Arends (12/42) May 16 Never seen it being a problem, but changing line 94 of lsystem.d
- drug007 (18/35) May 17 This patch fixed the issue:
- Danny Arends (4/23) May 17 Merged, and thanks again for taking the time to test it.
- drug007 (2/28) May 18 I think I haven't other issues
Hey all, I am developing a next iteration of my GFX engine (previously called CalderaD) and I am looking for help from the community to get some feedback on compilation instructions (any other feedback is very welcome as well as well as code quality). What can you do to help ? Please clone the repository, and try to build it on your system. Currently it shoudl build on Linux and windows 64bit. but since I don't have a Mac available it would be great to get some feedback on that as well. Please let me know any issues that you have (either here or via a Github issue) The repository lives here: https://github.com/DannyArends/DImGui (I know the name is chosen poorly, I'll probably change it in the Future to CalderaD, and get rid of the previous iteration) Some highlights of the engine: - Using importC to bind to SDL, Vulkan, and CImGui - Uses GLSL shaders for rendering - Has a Compute Shader pass rendering to a texture - Basic objects (triangles, squares, cubes, particle engine) - Renders PDB proteins and has a 3D Turtle on top of an L-system - Basic loading of Wavefront objects Hope this is allows, and thanks in advance for your feedback
May 15
On Thursday, 15 May 2025 at 08:29:52 UTC, Danny Arends wrote:Hey all, I am developing a next iteration of my GFX engine (previously called CalderaD) and I am looking for help from the community to get some feedback on compilation instructions (any other feedback is very welcome as well as well as code quality). What can you do to help ? Hope this is allows, and thanks in advance for your feedbackHaven't tried it yet, but from the first glance look what is missing: - example folder: with easy to run as "dub run" code (at least for supported and tested platforms) - screenshot for Readme.md - showing how the final result should look like
May 15
On Thursday, 15 May 2025 at 09:01:33 UTC, Sergey wrote:On Thursday, 15 May 2025 at 08:29:52 UTC, Danny Arends wrote:Thanks, I added a screenshot to the readme. What do you mean by example folder ? Currently the engine has a single scene.d file, which loads all objects in one go. Do you mean having multiple dub.json files each loading / setting up different scenes ?Hey all, I am developing a next iteration of my GFX engine (previously called CalderaD) and I am looking for help from the community to get some feedback on compilation instructions (any other feedback is very welcome as well as well as code quality). What can you do to help ? Hope this is allows, and thanks in advance for your feedbackHaven't tried it yet, but from the first glance look what is missing: - example folder: with easy to run as "dub run" code (at least for supported and tested platforms) - screenshot for Readme.md - showing how the final result should look like
May 15
On Thursday, 15 May 2025 at 09:18:37 UTC, Danny Arends wrote:Thanks, I added a screenshot to the readme. What do you mean by example folder ? Currently the engine has a single scene.d file, which loads all objects in one go. Do you mean having multiple dub.json files each loading / setting up different scenes ?Oh it's already kind of a working example. I thought the main code is just a library to be used in other projects as a dependency.
May 15
On Thursday, 15 May 2025 at 09:32:45 UTC, Sergey wrote:On Thursday, 15 May 2025 at 09:18:37 UTC, Danny Arends wrote:Indeed, the basic compile is doing a working example of the engine, the scene setup is eventually supposed to be provided by the user of the library. Again many thanks for the feedback :)Thanks, I added a screenshot to the readme. What do you mean by example folder ? Currently the engine has a single scene.d file, which loads all objects in one go. Do you mean having multiple dub.json files each loading / setting up different scenes ?Oh it's already kind of a working example. I thought the main code is just a library to be used in other projects as a dependency.
May 15
On 15.05.2025 11:29, Danny Arends wrote:Hey all,```bash user host:~/workspace/DImGui$ uname -a Apr 15 17:03:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux userg host:~/workspace/DImGui$ dub Starting Performing "debug" build using /usr/bin/dmd for x86_64. Building dimgui ~master: building configuration [default] Pre-build Running commands make: *** No rule to make target 'deps/cimgui/cimgui.o', needed by 'libcimgui.so'. Stop. Error Command failed with exit code 2: make -j 8 ```
May 16
On 16.05.2025 12:37, drug007 wrote:On 15.05.2025 11:29, Danny Arends wrote:I guess it's because I failed to clone submodule(s) ```bash user host:~/workspace/DImGui$ git submodule update --init --recursive Submodule 'deps/cimgui' (git github.com:cimgui/cimgui.git) registered for path 'deps/cimgui' Cloning into '/home/user/workspace/DImGui/deps/cimgui'... The authenticity of host 'github.com (140.82.121.4)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'github.com' (ED25519) to the list of known hosts. git github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git github.com:cimgui/cimgui.git' into submodule path '/home/user/workspace/DImGui/deps/cimgui' failed Failed to clone 'deps/cimgui'. Retry scheduled Cloning into '/home/user/workspace/DImGui/deps/cimgui'... git github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git github.com:cimgui/cimgui.git' into submodule path '/home/user/workspace/DImGui/deps/cimgui' failed Failed to clone 'deps/cimgui' a second time, aborting ``` Could you use not git protocol but https one? I can easily clone using latter: ```bash git clone https://github.com/cimgui/cimgui.git Cloning into 'cimgui'... remote: Enumerating objects: 5333, done. remote: Counting objects: 100% (1307/1307), done. remote: Compressing objects: 100% (303/303), done. remote: Total 5333 (delta 1156), reused 1014 (delta 1004), pack-reused 4026 (from 4) Receiving objects: 100% (5333/5333), 13.24 MiB | 16.12 MiB/s, done. Resolving deltas: 100% (3919/3919), done. ```Hey all,```bash user host:~/workspace/DImGui$ uname -a Apr 15 17:03:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux userg host:~/workspace/DImGui$ dub Starting Performing "debug" build using /usr/bin/dmd for x86_64. Building dimgui ~master: building configuration [default] Pre-build Running commands make: *** No rule to make target 'deps/cimgui/cimgui.o', needed by 'libcimgui.so'. Stop. Error Command failed with exit code 2: make -j 8 ```
May 16
On Friday, 16 May 2025 at 09:53:06 UTC, drug007 wrote:[...]Hmm, that is weird, I just added it using a ```bash git submodule add ``` Let me see if I can update that, never really worked with git submodules before Danny
May 16
On Friday, 16 May 2025 at 09:53:06 UTC, drug007 wrote:[...]Should be solved in commit: 86259698fd24be5f2fbad5fbcfe9ae4d1f416f01 Thanks for trying it, and reporting this. Let me know if it works now :)
May 16
On 16.05.2025 13:29, Danny Arends wrote:On Friday, 16 May 2025 at 09:53:06 UTC, drug007 wrote:Thank you! The problem is fixed. Now I need to install other dependencies, I'll do it later[...]Should be solved in commit: 86259698fd24be5f2fbad5fbcfe9ae4d1f416f01 Thanks for trying it, and reporting this. Let me know if it works now :)
May 16
On 16.05.2025 14:16, drug007 wrote:On 16.05.2025 13:29, Danny Arends wrote:I installed the dependencies, now I got the fowllowing error ```bash INFO: createScene: Add a Cube INFO: createScene: Add an Icosahedron INFO: createScene: Add Text INFO: createScene: Add Wavefront INFO: createScene: Add ParticleSystem INFO: createScene: Add L-System Thread 1 "DImGui" hit Breakpoint 1, _D7lsystem13createLSystemFZSQBa7LSystem (test=0x7fffffffd900) at src/math/lsystem.d:94 94 test.rules[Symbols.Origin] ~= Rule("W.O", 5); (gdb) p test.rules $1 = {ptr = 0x0} (gdb) ``` is it okay for AA to be null here? Does runtime initialize it here properly? P.S. also there is a bug if the box has no vulkan extensions at all the program will crush at src/engine/extensions.d:15On Friday, 16 May 2025 at 09:53:06 UTC, drug007 wrote:Thank you! The problem is fixed. Now I need to install other dependencies, I'll do it later[...]Should be solved in commit: 86259698fd24be5f2fbad5fbcfe9ae4d1f416f01 Thanks for trying it, and reporting this. Let me know if it works now :)
May 16
On Friday, 16 May 2025 at 18:40:46 UTC, drug007 wrote:On 16.05.2025 14:16, drug007 wrote:Thanks, I'll look into that one never had issues assigning to the L-System AA array. Does it cause a crash? If so could you do a stack trace to see if it comes from D runtime or just me not initializing it? About 2) No Vulkan will lead to a hard crash, when querying instance extensions due to no vulkan instance being available. It might be nicer to have a clean exit indeed.On 16.05.2025 13:29, Danny Arends wrote:I installed the dependencies, now I got the fowllowing error ```bash INFO: createScene: Add a Cube INFO: createScene: Add an Icosahedron INFO: createScene: Add Text INFO: createScene: Add Wavefront INFO: createScene: Add ParticleSystem INFO: createScene: Add L-System Thread 1 "DImGui" hit Breakpoint 1, _D7lsystem13createLSystemFZSQBa7LSystem (test=0x7fffffffd900) at src/math/lsystem.d:94 94 test.rules[Symbols.Origin] ~= Rule("W.O", 5); (gdb) p test.rules $1 = {ptr = 0x0} (gdb) ``` is it okay for AA to be null here? Does runtime initialize it here properly? P.S. also there is a bug if the box has no vulkan extensions at all the program will crush at src/engine/extensions.d:15On Friday, 16 May 2025 at 09:53:06 UTC, drug007 wrote:Thank you! The problem is fixed. Now I need to install other dependencies, I'll do it later[...]Should be solved in commit: 86259698fd24be5f2fbad5fbcfe9ae4d1f416f01 Thanks for trying it, and reporting this. Let me know if it works now :)
May 16
On 17.05.2025 00:26, Danny Arends wrote:Thanks, I'll look into that one never had issues assigning to the L-System AA array. Does it cause a crash? If so could you do a stack trace to see if it comes from D runtime or just me not initializing it?```bash INFO: createScene: Add a Square INFO: createScene: Add a Cube INFO: createScene: Add an Icosahedron INFO: createScene: Add Text INFO: createScene: Add Wavefront INFO: createScene: Add ParticleSystem INFO: createScene: Add L-System core.exception.RangeError src/math/lsystem.d(94): Range violation ---------------- ??:? onRangeError [0x57f0f10b5012] ??:? _d_arrayboundsp [0x57f0f109737d] src/math/lsystem.d:94 lsystem.LSystem lsystem.createLSystem() [0x57f0f1051bfe] src/scene.d:95 void scene.createScene(ref engine.App) [0x57f0f108bb6e] src/main.d:51 _Dmain [0x57f0f1051169] ```About 2) No Vulkan will lead to a hard crash, when querying instance extensions due to no vulkan instance being available. It might be nicer to have a clean exit indeed.
May 16
On Friday, 16 May 2025 at 21:35:04 UTC, drug007 wrote:On 17.05.2025 00:26, Danny Arends wrote:Never seen it being a problem, but changing line 94 of lsystem.d from ``` test.rules[Symbols.Origin] ~= Rule("W.O", 5); ``` To ``` test.rules[Symbols.Origin] = Rule("W.O", 5); ``` Would fix it, I guess appending might not be allowed when the key doesn't exist yet.Thanks, I'll look into that one never had issues assigning to the L-System AA array. Does it cause a crash? If so could you do a stack trace to see if it comes from D runtime or just me not initializing it?```bash INFO: createScene: Add a Square INFO: createScene: Add a Cube INFO: createScene: Add an Icosahedron INFO: createScene: Add Text INFO: createScene: Add Wavefront INFO: createScene: Add ParticleSystem INFO: createScene: Add L-System core.exception.RangeError src/math/lsystem.d(94): Range violation ---------------- ??:? onRangeError [0x57f0f10b5012] ??:? _d_arrayboundsp [0x57f0f109737d] src/math/lsystem.d:94 lsystem.LSystem lsystem.createLSystem() [0x57f0f1051bfe] src/scene.d:95 void scene.createScene(ref engine.App) [0x57f0f108bb6e] src/main.d:51 _Dmain [0x57f0f1051169] ```About 2) No Vulkan will lead to a hard crash, when querying instance extensions due to no vulkan instance being available. It might be nicer to have a clean exit indeed.
May 16
On 17.05.2025 01:26, Danny Arends wrote:Never seen it being a problem, but changing line 94 of lsystem.d from ``` test.rules[Symbols.Origin] ~= Rule("W.O", 5); ``` To ``` test.rules[Symbols.Origin] = Rule("W.O", 5); ``` Would fix it, I guess appending might not be allowed when the key doesn't exist yet.This patch fixed the issue: ```bash diff --git a/src/math/lsystem.d b/src/math/lsystem.d index 394e902..02c085d 100644 --- a/src/math/lsystem.d +++ b/src/math/lsystem.d -91,7 +91,7 struct LSystem { LSystem createLSystem() { auto test = LSystem([Symbols.Origin]); - test.rules[Symbols.Origin] ~= Rule("W.O", 5); + test.rules[Symbols.Origin] = Rules([Rule("W.O", 5)]); test.rules[Symbols.Origin] ~= Rule("S.O", 5); test.rules[Symbols.Origin] ~= Rule("A.O", 5); test.rules[Symbols.Origin] ~= Rule("D.O", 5); ``` The demo compiles and works!
May 17
On Saturday, 17 May 2025 at 07:20:06 UTC, drug007 wrote:On 17.05.2025 01:26, Danny Arends wrote:Merged, and thanks again for taking the time to test it. Any comments/steps that you needed to take that were unclear in the readme ?[...]This patch fixed the issue: ```bash diff --git a/src/math/lsystem.d b/src/math/lsystem.d index 394e902..02c085d 100644 --- a/src/math/lsystem.d +++ b/src/math/lsystem.d -91,7 +91,7 struct LSystem { LSystem createLSystem() { auto test = LSystem([Symbols.Origin]); - test.rules[Symbols.Origin] ~= Rule("W.O", 5); + test.rules[Symbols.Origin] = Rules([Rule("W.O", 5)]); test.rules[Symbols.Origin] ~= Rule("S.O", 5); test.rules[Symbols.Origin] ~= Rule("A.O", 5); test.rules[Symbols.Origin] ~= Rule("D.O", 5); ``` The demo compiles and works!
May 17
On 17.05.2025 11:00, Danny Arends wrote:On Saturday, 17 May 2025 at 07:20:06 UTC, drug007 wrote:I think I haven't other issuesOn 17.05.2025 01:26, Danny Arends wrote:Merged, and thanks again for taking the time to test it. Any comments/steps that you needed to take that were unclear in the readme ?[...]This patch fixed the issue: ```bash diff --git a/src/math/lsystem.d b/src/math/lsystem.d index 394e902..02c085d 100644 --- a/src/math/lsystem.d +++ b/src/math/lsystem.d -91,7 +91,7 struct LSystem { LSystem createLSystem() { auto test = LSystem([Symbols.Origin]); - test.rules[Symbols.Origin] ~= Rule("W.O", 5); + test.rules[Symbols.Origin] = Rules([Rule("W.O", 5)]); test.rules[Symbols.Origin] ~= Rule("S.O", 5); test.rules[Symbols.Origin] ~= Rule("A.O", 5); test.rules[Symbols.Origin] ~= Rule("D.O", 5); ``` The demo compiles and works!
May 18