Re: Problem with gfm.math.matrix (some gamedevs out there ?)

2020-09-03 Thread Thomas via Digitalmars-d-learn
On Thursday, 3 September 2020 at 13:31:01 UTC, Mike Parker wrote: On Thursday, 3 September 2020 at 12:36:35 UTC, Thomas wrote: My example code: - import std.stdio; int main() { import gfm.math.matrix; const int width = 800; const int height = 600; auto p

Problem with gfm.math.matrix (some gamedevs out there ?)

2020-09-03 Thread Thomas via Digitalmars-d-learn
Hi! I am following some examples in C++ about how OpenGL is working. There are great tutorials out there and most of it works also with D. For my code I am using gfm.math.matrix (Version 8.0.3) to be able to calculate the mouse position in a 3d world. Now I have some problems with the projecti

Re: Just another question about memory management in d from a newbie

2019-06-17 Thread Thomas via Digitalmars-d-learn
On Monday, 17 June 2019 at 20:26:28 UTC, H. S. Teoh wrote: On Mon, Jun 17, 2019 at 07:53:52PM +, Thomas via Digitalmars-d-learn wrote: [...] [...] If x were a heap-allocated object, then your concerns would be true: it would be allocated once every iteration (and also add to the garbage

Re: Just another question about memory management in d from a newbie

2019-06-17 Thread Thomas via Digitalmars-d-learn
First, thank you for your fast reply! On Monday, 17 June 2019 at 20:00:34 UTC, Adam D. Ruppe wrote: No, the compiler will generate code to reuse the same thing each loop. Does this code also work on complex types like structs ?

Just another question about memory management in d from a newbie

2019-06-17 Thread Thomas via Digitalmars-d-learn
Hello! First my background: C++ and Java ages ago. Since then only PLSQL. Now learning D just for fun and personal education on time to time and very pleased about it :-) Now I have to ask a question here, because I could not find a corresponding answer for it. Or I am unable to find it :-)

Re: Windows Service

2018-11-14 Thread Thomas via Digitalmars-d-learn
On Thursday, 15 November 2018 at 04:45:26 UTC, Soulsbane wrote: On Wednesday, 14 November 2018 at 19:38:08 UTC, Thomas wrote: Hi, I want to run a D program as a Windows service. After googl'in, I only found a very old project on github: https://github.com/tylerjensen/WindowsServiceInD Unfort

Windows Service

2018-11-14 Thread Thomas via Digitalmars-d-learn
Hi, I want to run a D program as a Windows service. After googl'in, I only found a very old project on github: https://github.com/tylerjensen/WindowsServiceInD Unfortunately, I wasn't able to compile it successfully. Does anybody know of newer approaches or even a template to start from? Th

How to catch line number of exception without catching it ?

2017-12-13 Thread Thomas via Digitalmars-d-learn
Hi forks! I wanted to ask if there is a way to catch the line position on an exception without setting a try + catch block ? What I want is something like this: module main; import std.stdio; import std.conv; void foo() { scope(failure) { writeln("Got a failu

Re: Problem getting Cimgui to work

2017-12-07 Thread Thomas via Digitalmars-d-learn
So the steps should be: checkout imgui 1.50 checkout cimgui 1.50 Build both Put them on your system library path Then you should be set to use DerelictIMGUI without the need to modify its package recipe. Thank you for your very very good description what was going on and how everything rel

Re: Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
Hi folks! I got it to work, but honestly I don't know why.. :-) 1. clone project imgui_d_test with git 2. subloading the base cimgui stuff by command: git submodule update --init --recursive 3. enter cimgui directory and enter make 4. after that dub doesn't work properly, you have to edit app.

Re: Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 19:37:54 UTC, Thomas wrote: On Wednesday, 6 December 2017 at 19:12:43 UTC, drug wrote: I've check it before posting using old version dmd 2.073 and it works. What dmd version you compile with? Hi. The newest as I know. Version 2.077.0 (64bit Version) But th

Re: Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 19:12:43 UTC, drug wrote: I've check it before posting using old version dmd 2.073 and it works. What dmd version you compile with? Hi. The newest as I know. Version 2.077.0 (64bit Version) But the error messages in my last post don't seem to relate to my p

Re: Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 18:27:20 UTC, drug wrote: probably this can help you https://github.com/drug007/timespatial this project uses cimgui by means of derelict-imgui Hi, thank you. I tried it and first it seemed to work, but after I entered "dub build config=demo" following error me

Re: Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
Could you describe what dub package you tried to build first of all? It helps to reproduce your case. Hello. In my personal project folder I only have: derelict-sdl2 version="~>3.1.0-alpha.2" derelict-imgui version="~>0.9.4" Then I realized that I needed the shared library file cimgui.so U

Problem getting Cimgui to work

2017-12-06 Thread Thomas via Digitalmars-d-learn
Hi guys! I need some help or advice about Cimgui (a C-API for Imgui) because I have no idea how to get it working. First, I'm new to D (only a few weeks) and still learning. I have a small C++/C# background, but wanted to try something new. So D got into my focus. I am working on Manjaro Li