This should be trivial, right?
I've been looking at existing D repo code for hours. Can't figure
why TTF_Init doesn't work?
It would help if I could figure out how to use SDL_GetError()
INFO: SDL loaded v2.30.2
INFO: SDL initialized: 0
INFO: TTF loaded: v2.0.14
Error Program exited with code -1
import std.container : RedBlackTree;
int main()
{
struct Location {
int x;
int y;
}
struct Node{
this(Location loc, uint f) {
this.loc = loc;
this.f = f;
}
Location loc;
uint f;
}
auto priorityQueue = new R
Thanks, that did the trick. Not sure why having the declarations
at global scope (or is it module scope in D) would work versus
having them at local scope?
I run the program (at the bottom) and get, as expected, the
run-time out of memory error:
PS C:\D\sandbox> .\Reserve.exe
newCapacity = [ 1]
newCapacity = [ 3]
newCapacity = [ 5]
ooo
newCapacity = [905,207,293]
newCapaci
I'm playing around with dynamic arrays and I wrote the tiny
program (at bottom). I get the following output:
PS C:\D\sandbox> dmd -m64 maxMem.d
PS C:\D\sandbox> .\maxMem.exe
Reserving 1,610,613,245 elements
reserve() returned a size of: 1,610,613,245
The capacity() of big is 1,610,613,245
ulong.
I was a little (nicely) surprised that I could use double quotes,
single quotes, or back ticks in the following line of code.
return s.split(";"); // double quotes
or
return s.split(';'); // single quotes
or
return s.split(`;`); // back ticks
Does D provide any guidance as to what is pref
I lost about a half an hour troubleshooting some code of mine
which as it turned out to be resolved with just one line.
// paths.remove(i); // compiles fine but does nothing
paths = paths.remove(i); // works - what I erroneously thought
the previous line was doing
Is the first line no
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "S-1-5-
I'm naturally getting a undefined identifier `s` error in the
return. Is there some way to refactor my code? I tried to
declare s outside of the else brackets like:
auto screen = executeShell(cmdLine);
auto s;
...
{
s = screen.output.findSplit("REG_SZ");
}
but that doesn't compile either
typeof(screen.output.findSplit("")) s;
Perfect. That was the "essence" of my question. But thanks to
Ali, I don't have to use such esoteric syntax. D is a wonderful
language, but I seem to shoot myself in the foot :)
I've got a pretty straightforward SDL dub file
dependency "bindbc-opengl"version="~>1.0.3"
versions "GL_46"
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW_33"
dependency "gl3n" version="~>1.4.1"
dependency "bindbc-freeimage" version="~>0.1.1"
versions "FI_317"
Unr
On Monday, 31 October 2022 at 20:31:11 UTC, ryuukk_ wrote:
On Monday, 31 October 2022 at 20:20:49 UTC, WhatMeWorry wrote:
I've got a pretty straightforward SDL dub file
dependency "bindbc-opengl"version="~>1.0.3"
versions "GL_46"
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW
and is abending with an error saying exactly this. How do I
specify the path to this library? Can I use one of the
environment variables in sc.ini, one of the Windows env
variables, or one of the dub options?
Btw, I'm bypassing on purpose the official D installation.
On Monday, 20 February 2023 at 01:04:25 UTC, Mike Parker wrote:
Any error about a missing DLL is a run-time error that's
unrelated to dub or the compiler.
Normally, for end users, a missing MSVC runtime DLL means you
have to install the MSVC Redistributable package. This version
of the DLL yo
I've tried distilling the problem to its very essence.
I downloaded the FreeImage.dll from
https://freeimage.sourceforge.io/download.html
to the following directory:
where /R c:\ FreeImage.dll
c:\Users\Admin\Downloads\FreeImage3180Win32Win64\FreeImage\Dist\x64\FreeImage.dll
dir
c:\Users
On Friday, 3 March 2023 at 19:44:17 UTC, ryuukk_ wrote:
What happens if you put the dll next to your executable, does
it find it?
Good idea. I copied the dll into same directory as the executable
and changed loadFreeImage to
immutable FISupport fiLib = loadFreeImage();
And I get the same no
my small dub.sdl project uses:
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW_33"
and returns
Building bindbc-glfw 1.0.1: building configuration [dynamic]
C:\Users\Admin\AppData\Local\dub\packages\bindbc-glfw-1.0.1\bindbc-glfw\source\bindbc\glfw\binddynamic.d(557,11):
Deprecati
On Thursday, 9 March 2023 at 06:36:18 UTC, IchorDev wrote:
On Thursday, 9 March 2023 at 00:21:02 UTC, WhatMeWorry wrote:
[...]
Sorry about that. Try updating to bindbc-glfw 1.0.2, should be
fixed now. If you see any other deprecation warnings from
BindBC bindings you can silence them with `-
I appreciate all the help people have given me previously. So
I've made everything super simple. The dub.sdl file consists of
four lines:
name "00_03_freeimage_debug"
dependency "bindbc-glfw" version="~>1.0.0"
dependency "bindbc-freeimage" version="~>1.0.2"
versions "FI_318"
The app.d use ex
Ok, I've gotten rid of dub and dub packages code. Just
LoadLibraryA. All eight dlls work except for FreeImage.dll. I've
compiled with dmd and -m64 option and freshly download a x64
FreeImage. Any Window users out there that use LoadLibraryA or
FreeImage.dll?
```
import std.stdio: writeln;
imp
On Wednesday, 22 March 2023 at 21:08:23 UTC, Richard (Rikki)
Andrew Cattermole wrote:
I finally went ahead and looked at the dependencies of
FreeImage3180.
Try installing:
https://www.microsoft.com/en-ca/download/details.aspx?id=48145
It requires VCOMP140.dll which comes with the 2015 VC
re
I just need an even/odd functionality. Don't think D has a
built-in operator.
// Found this C code online.
int isEven(int num)
{
return !(num & 1);
}
// found this in std.functional.unaryFun
alias isEven = unaryFun!("(a & 1) == 0");
assert(isEven(2) && !isEven(1));
If int
On Wednesday, 26 April 2023 at 23:02:07 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Don't forget ``num % 2 == 0``.
None should matter, pretty much all production compilers within
the last 30 years should recognize all forms of this and do the
right thing.
Thanks. Fastest reply ever! And I
Wanted to study code.
I watched the video talk. But i couldn't see any URL etc..
Believe it was called Draw.
Huge fan of Mike Shah's YouTube videos regarding D and his latest
for D conference:
https://mshah.io/conf/24/DConf%20%20Online%202024%20_%20The%20Case%20for%20Graphics%20Programming%20in%20Dlang.pdf
So I installed github desktop app and cloned his Talks repo.
There is a build command commen
Error: Unresolvable dependencies to package bindbc-loader:
bindbc-opengl 0.13.0 depends on bindbc-loader ~>0.3.0
bindbc-sdl 1.4.7 depends on bindbc-loader ~>1.1.0
import bindbc.sdl;
import bindbc.loader;
SDL_version ver;
SDL_GetVersion(&ver);
writeln("version = ", ver); // runs and displays: version =
SDL_version(2, 30, 2)
writeln("version = ", SDL_GetVersion(&ver)); // compile fails
with
// template `wr
This is a very stupid question but from Ali's book, I took this
segment:
writeln("Résumé preparation: 10.25€");
writeln("\x52\ésum\u00e9 preparation: 10.25\€");
and after running it all I get is the following:
Résumé preparation: 10.25€
Résumé preparation: 10.25€
I was expecting t
int[] a = [ 3, 7, 9 ];
1) a = [];
and
2) a = null;
sets both the .ptr property of the array to null, and the length
to 0.
whereas
3) a.length = 0;
just sets the length to 0.
If all the above is correct, does this mean we should just stick
to either of the first two forms and never use
Is this even possible?
klondike.d(155): Error: no identifier for declarator c
klondike.d(155): Error: declaration expected, not =
struct FoundationPile
{
Card[] up;// all cards are face up on the Foundation
}
FoundationPile[4] foundations;
static if(true)
{
int r = 2;
int c =
On Monday, 9 September 2019 at 19:12:34 UTC, Adam D. Ruppe wrote:
On Monday, 9 September 2019 at 19:08:17 UTC, WhatMeWorry wrote:
Is this even possible?
what are you trying to do?
if c is static, it just needs to be initialized by a helper
function, like
int helper() {
int c = 60;
f
Just got through debugging a line of code which uses dynamic
array. It boiled to to my use of []. How should I "D think"
about slice[]? The run time error seems to say the the length of
[] is zero. I was assuming that [] meant "the entirety" of the
array.
In short, is there anytime th
On Wednesday, 25 September 2019 at 19:25:06 UTC, Ali Çehreli
wrote:
On 09/25/2019 12:06 PM, WhatMeWorry wrote:
> I was
> assuming that [] meant "the entirety" of the array.
Assuming we're talking about D slices, Yes. (It could be a
user-defined type with surprisingly different semantics.)
>
Really stupid question here, but when I try to run the same
command I get:
C:\Users\whatmeworry>dub add arsd-official
Unknown command: add
USAGE: dub [--version] [] [] [--
[]]
. . .
DUB version 1.11.0, built on Oct 6 2018
I thought about dub init, but that still doesn't give me an 'ad
The documentation doesn't go into much detail:
sourcePaths "" ["" [...]] Allows to customize the
path where to look for source files (any folder "source" or "src"
is automatically used as a source path if no sourcePaths setting
is specified) - note that you usually also need to define
"impo
I'm trying to study Adam Ruppe's terminal.d sub-package and I see
the following code segment:
version(demos) unittest
{
import arsd.terminal;
void main()
{
// . . .
}
main; // exclude from docs
}
Looks like a good baby step to take, so in the command line I use:
1) The D Language Reference says:
"There are four kinds of arrays..." with the first example being
"type* Pointers to data" and "int* p; etc.
At the risk of sounding overly nitpicky, isn't a pointer to an
integer simply a pointer to an integer? How does that pertain to
an array?
2) "
module user;
export { int myAddSeven(int a, int b); }
void main()
{
int total = myAddSeven(2, 3);
}
dmd -m64 -c user.d
module mydll;
export extern(D) {
int myAddSeven(int a, int b) { return a+b+7; } /* <--
function body */
}
dmd -c -shared -m64 mydll.d
link mydll.obj /DLL
On Thursday, 1 October 2020 at 09:22:29 UTC, user1234 wrote:
On Wednesday, 30 September 2020 at 11:45:53 UTC, Ferhat
Kurtulmuş wrote:
On Tuesday, 29 September 2020 at 21:22:21 UTC, WhatMeWorry
wrote:
module user;
export { int myAddSeven(int a, int b); }
[...]
it is better to use this templa
On Thursday, 1 October 2020 at 20:28:58 UTC, kinke wrote:
On Thursday, 1 October 2020 at 20:03:19 UTC, WhatMeWorry wrote:
Yes, but shouldn't the /NOENTRY option take care of that. Say,
I just want to make a DLL of simple functions.
Your little example has 2 problems, the first being an
incomp
On Thursday, 1 October 2020 at 21:56:46 UTC, Ferhat Kurtulmuş
wrote:
On Thursday, 1 October 2020 at 21:35:42 UTC, WhatMeWorry wrote:
On Thursday, 1 October 2020 at 20:28:58 UTC, kinke wrote:
[...]
Thanks all. I've gotten it to work with:
[...]
[...]
[...]
total = 12
[...]
1) try
I've go a small DLL and a test module both written in D. Why do I
need to use the extern(C)? Shouldn't both sides be using D name
wrangling?
mydll.d
module mydll;
extern(C): // removing or changing to (D): results in error
export
{
On Friday, 16 October 2020 at 15:14:03 UTC, Ali Çehreli wrote:
On 10/15/20 2:42 PM, Ali Çehreli wrote:
> I've recently done the same by calling dlopen() and dlsym()
> directly. Runtime.loadLibrary documentation says "If the
library
> contains a D runtime it will be integrated with the current
ru
module mydll;
extern (C):
import core.stdc.stdio : printf;
export
{
int addSeven(int a, int b)
{
//printf("Hello from within my DLL");
return a+b+7;
}
}
The above D code file compiles and links, no problems with
C:\D\dmd2\samples\d\mydll>dmd -v -m64 mydll.d -L/DLL -L/
I've been studying an 8 year old D project in Github and this
code fragment has left me befuddled. I'm confused as to when and
how the new BreakState() statement gets executed. Wouldn't the
class DebuggerSession need to be instantiated first and then the
this() constructor be called? Which
On Wednesday, 11 November 2020 at 06:21:38 UTC, Jacob Carlborg
wrote:
On 2020-11-11 06:29, WhatMeWorry wrote:
Which begs the question, how would the statement, m_State =
new BreakState() ever get executed?
class DebuggerSession
{
private BreakState m_State = new BreakState();
privat
I was poking around the dmd code just to "learn from the best"
and I came across some files that ended with the .d extension
which did not have the module statement. (I was under the naive
impression that all .d files must have a module statement)
However, in the directory:
https://github.
The DMD forum mentions internal design. This is more of a
beginner usage question.
- from Compiler Switches
-
-I=directory
Look for imports also in directory
-i[=pattern ]
Enables "include imports" mode, where the compiler will
in
I'm trying to build DMD with Visual D under Visual Studio as
shown in the Wiki:
https://wiki.dlang.org/Building_under_Windows
The notes say to use the solution vcbuild:
You should be able to build DMD using the visual studio solution
found in: dmd\src\vcbuild A typical choice is to build t
On Tuesday, 1 December 2020 at 22:58:53 UTC, WhatMeWorry wrote:
I'm trying to build DMD with Visual D under Visual Studio as
shown in the Wiki:
https://wiki.dlang.org/Building_under_Windows
The notes say to use the solution vcbuild:
You should be able to build DMD using the visual studio
s
Looking at;
https://dlang.org/dmd-windows.html#library
Compile modules separately and then run the librarian on them:
dmd -c foo.d
dmd -c bar.d
phobos.lib -c -p32 foo.lib foo.obj bar.obj abc.obj def.lib
The last line puzzles me. I presume phobos.lib is the "librarian"
referred to in the fi
On Wednesday, 16 December 2020 at 22:51:55 UTC, WhatMeWorry wrote:
Looking at;
https://dlang.org/dmd-windows.html#library
Compile modules separately and then run the librarian on them:
dmd -c foo.d
dmd -c bar.d
phobos.lib -c -p32 foo.lib foo.obj bar.obj abc.obj def.lib
My bad. I now see th
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#Linkingmanually
```
The fix is to specify the prebuilt .lib file on the command line:
dmd driver.d %cd%\libs\libfoo\libfoo.lib
```
The tutorial is for 32 bit so it u
On Saturday, 2 January 2021 at 22:04:28 UTC, WhatMeWorry wrote:
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#Linkingmanually
[...]
Oops. used the manual example. Should be
/LIBPATH:c:\dev\LibraryStudy\StaticLibr
On Sunday, 3 January 2021 at 15:49:03 UTC, Imperatorn wrote:
On Saturday, 2 January 2021 at 22:08:34 UTC, WhatMeWorry wrote:
On Saturday, 2 January 2021 at 22:04:28 UTC, WhatMeWorry wrote:
I'm stepping through the windows static library tutorial at
http://prowiki.org/wiki4d/wiki.cgi?D__Tutoria
https://github.com/dlang/dlang.org/blob/ff235feedcb2bcb73ba348dcd1763542a43c7778/doc.ddoc
D_S = $(LAYOUT ,$1,$(ARGS $+))
SPEC_S = $(LAYOUT ,$1,$(ARGS $+))
COMMUNITY= $(LAYOUT ,$1,$(ARGS $+))
_=
LAYOUT=$3
_=
I realize that D_S and LAYOUT, etc are macros. I've read the DDoc
documentation
// The following four lines in run.lang.io
int[] a;
alias T = long;
pragma(msg, is(typeof(a) : U[], U : T));
pragma(msg, is(typeof(a) : T[]));
// returns
true
false
But I'm not even sure what I'm looking at. Ali's book talks
about the colon appearing for
:, associative array ⬁
:, import
I'm studying the D article at:
https://dlang.org/articles/dll-linux.html#dso5
https://dlang.org/articles/dll-linux.html#dso6
Statically Linking D Program With libphobos2.a
Statically Linking D Program With libphobos2.so
Don't we want to Dynamically link with shared libphobos2.so?
Also why do
I'm trying to create a super simple dynamic library consisting of
two files:
file2.d --
extern(D):
double addEight(double d) { return (d + 8.0); }
fileB.d --
extern(D)
{
string concatSuffix(string s) { return
On Wednesday, 10 February 2021 at 11:38:00 UTC, Ferhat Kurtulmuş
wrote:
On Tuesday, 9 February 2021 at 19:37:17 UTC, WhatMeWorry wrote:
I'm trying to create a super simple dynamic library consisting
of two files:
[...]
remove /NOENTRY, and include "mixin SimpleDllMain;" in one of
the sour
It seems pretty obvious the problem is with name mangling. But
how to fix it?
--
module file;
extern(D) export
{
int addOne(int i) { return (i + 1); }
}
--
module p
On Sunday, 28 February 2021 at 22:10:21 UTC, Siemargl wrote:
On Sunday, 28 February 2021 at 18:29:11 UTC, WhatMeWorry wrote:
It seems pretty obvious the problem is with name mangling. But
how to fix it?
fixing
int numb = 1;
and your example work correct
ldc 1.24 / win10
P.S.I'm not re
While studying Ali's book at chapter "Constructor and Other
Special Functions" and the below code snippet:
import std.stdio;
struct S {
this(int i) { writeln("an object"); }
// Original
//this(int i) const { writeln("a const object"); }
//this(int i) immuta
Quoting the D documentation:
size_t is an alias to one of the unsigned integral basic types,
and represents a type that is large enough to represent an offset
into all addressable memory. And I have a line of code:
size_t huge = ulong.max;
dmd GC.d
GC.d(29): Error: cannot implicitly convert
Thanks all. I sometimes feel like Michael Corleone: "Just when I
thought I was out, they pull me back in!" :)
I realize it is not the place for it, but sometimes I wish the
Library Reference explained things in terms of "why".
On Tuesday, 4 September 2018 at 19:40:10 UTC, JN wrote:
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:
Most C++ game related projects uses GLM as they default
math/vector lib (even if not using opengl).
In D we have (that I found):
gfm.math - https://github.com/d-gamedev-team
https://dlang.org/blog/2019/03/14/containerize-your-d-server-application/
I'm following the excellent blog posting by Mr. Nacke, but I keep
getting the following
error when I attempt to compile hellorest with dub. Since
everything is pretty much on
autopilot, Everything seems to have worked be
On Tuesday, 26 March 2019 at 21:20:06 UTC, Andre Pany wrote:
On Tuesday, 26 March 2019 at 17:36:15 UTC, WhatMeWorry wrote:
https://dlang.org/blog/2019/03/14/containerize-your-d-server-application/
I'm following the excellent blog posting by Mr. Nacke, but I
keep getting the following
error whe
I've been using DUB for several years and I've gotten it to work
generally. But I've been trying to troubleshoot a DUB issue for
two days now and I've come to the conclusion, I don't really
understand DUB and I'm tired of muddling through. (Surely it
hurts that I've never been exposed to a li
Linking...
01_06_coord_systems.obj : error LNK2001: unresolved external
symbol _D11common_game12__ModuleInfoZ
01_06_coord_systems.obj : error LNK2001: unresolved external
symbol _D14post_processor12__ModuleInfoZ
I've gotten plenty of undefined external symbol errors in my time
but how does o
On Wednesday, 26 July 2017 at 02:31:33 UTC, Mike Parker wrote:
On Wednesday, 26 July 2017 at 02:24:06 UTC, WhatMeForget wrote:
[...]
Because .sizeof has nothing to do with how many elements are in
the array. It tells you how much space the array itself takes
up.
Totally agree. .length ret
On Wednesday, 26 July 2017 at 02:32:07 UTC, Adam D. Ruppe wrote:
I've hand rolled a function which is working for me currently,
but with my coding ability, I'd feel much safer with something
official :)
You could also do (cast(ubyte[]) array).length.
This was my (way over complicated) att
On Friday, 18 August 2017 at 20:39:38 UTC, angel wrote:
On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote:
[...]
This actually appears correct ...
The 1-st example:
Each call to makeCalculator() increments a static (i.e. shared
among all makeCalculator() instances) variable - cont
It's stuff like this which makes me very frustrated. Or depressed
because it demonstrates just how poor a programmer I am:
string printStatement(string message) {
return `writeln("` ~ message ~ `");`;
}
void main()
{
// Mixins are for mixing in generated code into the source
code.
On Monday, 25 September 2017 at 06:07:58 UTC, H. S. Teoh wrote:
On Mon, Sep 25, 2017 at 05:28:13AM +, WhatMeForget via
Digitalmars-d-learn wrote:
[...]
You're not the only one. I stared at this same piece of
documentation for a long time before I figured out what it
meant. This is anoth
I don't know the first step about how to trouble shoot this? I
haven't changed anything with my configuration.
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at
C:\ProgramData\dub\packages\local-packages.js
On Saturday, 30 September 2017 at 18:21:11 UTC, Jon Degenhardt
wrote:
On Saturday, 30 September 2017 at 17:17:17 UTC, SrMordred wrote:
[...]
It's easy to overlook, but documentation for splitter starts
out:
Lazily splits a range using an element as a separator.
An element of a string
I've got a github project and using DUB with DMD and I keep
running into this problem. I've tried deleting the entire
...\AppData\Roaming\dub\packages folder, but the
problem repeats the very next build attempt.
Fetching derelict-util 2.0.6 (getting selected version)...
Fetching derelict-ft 1
I've tried debugging this for hours to no avail. It works on
Windows and Mac fine. But I'm running Antergos Linux (very much
like Arch) and it keeps failing at the System Init line. The code
is pretty much a copy of the example of derelict fmod on github.
I have no idea what the "bindings" num
I've been using Dub for a while but from the very beginning I
decided to go with SDL 100% of the time, So I've got a dub.sdl
file like:
name "01_10_camera_view_space"
description "A minimal D application."
authors "kheaser"
copyright "Copyright © 2017, kheaser"
license "proprietary"
dependen
I can compile the derelict-fmod example with
dub.json
...
"dependencies": {
"derelict-util": ">=1.9.1"
...
and dub.selections.json
...
"versions": {
"derelict-util": "2.1.0"
...
dub run
Fetching derelict-util 2.
enum SoundType { MUSIC = 0, SOUND_EFFECT };
struct Sound
{
string file;
SoundType musicOrSfx;
void* ptr; // Mix_Chunk* for sfx; Mix_Music* for
music;
}
immutable Sound[string] soundLibrary = // line 148
[
"SCRATCH" : { file : "scratch.wav", musicOrSfx :
I've built a sound.d module with lots data types, free functions
(initAndOpenSound() loadSound()), and enums etc.
In my main/app.d module, I've created the the following
associative array:
void main(string[] argv)
{
initAndOpenSound();
Track[string] tracks =
[
"SCRATCH"
On Thursday, 11 January 2018 at 23:29:30 UTC, Adam D. Ruppe wrote:
On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote:
When I simply move the array out of main() but still in app.d,
the compiler returns
Error: expression ["SCRATCH":Track("scratch.wav",
cast(Sound)1, 0, null),... i
Sorry if this is the wrong place to post, but I just came across
this just now:
https://www.khronos.org/opengl/wiki/Language_bindings
I was thinking that with derelictGL, D should be on this list?
If so, I'm not sure how one would go about this?
I read where shared classes have not been implemented yet. So I'm
using
just a struct e below: But the output below is showing that
sharing is
not happening between Struct in main() and the various spawned
threads.
I'm I doing something wrong?
creating queue in EventBuffer constructor
even
On Friday, 9 March 2018 at 10:42:47 UTC, Kagamin wrote:
To make a struct noncopyable, add @disable this(this); to it,
then compiler will give an error on an attempt to copy it.
I tried the @disable this(this); but now it doesn't even compile?
Error: template std.concurrency.spawn cannot deduce
I'm porting over some C++/glm/openGL code. I've used gl3n for a
while now (successfully) to port over glm code, but I've got this
pebble in my shoe:
glm::mat4 model;
model = glm::scale(model, glm::vec3(size, 1.0f)); // size is a
vec2
So my D code consists of:
mat4 model;
model = model.sc
On Monday, 26 October 2015 at 03:53:21 UTC, Adam D. Ruppe wrote:
On Monday, 26 October 2015 at 03:44:31 UTC, WhatMeWorry wrote:
First, isn't Vector!(float,3) a template which creates a tuple
consisting of float, float, float; so aren't the argument
types identical?
I'm not familiar with the g
On Monday, 26 October 2015 at 21:25:58 UTC, Cleverson wrote:
Hello,
Is there any library or module for easily managing basic audio
functions, e.g., play/pause/stop a sound? I can't find it
amongst the standard library and the packages colection, or
maybe I don't know how to search properly, s
Just translating some simple C++/glm/opengl tutorial code to
D/gl3n/opengl and I'm coming across more friction than I
expected. I've got a square centered at my window which is
rotated by 45 degrees (counter clockwise) and then moved to the
lower right quadrant.
// C++ glm opengl code
glm:
On Sunday, 10 January 2016 at 04:37:43 UTC, Mike Parker wrote:
On Sunday, 10 January 2016 at 02:51:57 UTC, WhatMeWorry wrote:
Is gl3n not a direct replacement for glm?
From the very top of the gl3n github page:
"OpenGL Maths for D (not glm for D)."
So, no, it is not. You might want to s
On Sunday, 10 January 2016 at 06:35:34 UTC, rsw0x wrote:
On Sunday, 10 January 2016 at 02:51:57 UTC, WhatMeWorry wrote:
Just translating some simple C++/glm/opengl tutorial code to
D/gl3n/opengl and I'm coming across more friction than I
expected. I've got a square centered at my window whic
On Sunday, 10 January 2016 at 10:38:07 UTC, Johan Engelen wrote:
On Sunday, 10 January 2016 at 10:35:34 UTC, Johan Engelen wrote:
It's pretty strange that there is no "translate" method...
Didn't see it in the online docs, but in the source there is
the "translate" method that you should use.
file 1: camera.d
---
module camera;
class Camera
{
public:
// Camera Attributes
vec3 position = vec3(0.0f, 0.0f, 0.0f);
. . .
};
---
file 2: main.d
---
module main;
import camera;
Camera camera; // Compile error (1)
--
I'm porting a C++/opengl/AssImp tutorial over to
D/DerelictOpenGL/DerelictAssImp
but have hit a brick wall.
It's a fairly large project but a tiny fragment suffices:
if(mesh.mMaterialIndex >= 0)
{
const aiMaterial* material =
scene.mMaterials[mesh.mMaterialIndex];
// uint texCount =
m
I was thinking about fixed length arrays of structures the other
day so I played around with the flowing code:
struct Foo
{
inti;
string str;
void info() { writeln("i = ", i, "str = ", str); }
}
Foo[2] foos;
auto f1 = Foo(1, "6chars"); // this st
If so, is there a way to do a global search of all projects in
DUB?
--- main.d
void main(string[] argv)
{
ResourceManager.LoadShader("VertexShader.glsl",
"FragmentShader.glsl", "filler",
"sprite");
--- File ResourceManager.d
class ResourceManager
{
public:
On Friday, 11 March 2016 at 23:14:48 UTC, ag0aep6g wrote:
On 11.03.2016 23:47, WhatMeWorry wrote:
[...]
This suggests that you simply `import ResourceManager;` in
main.d.
[...]
Very good. Thanks for the fix and the pointers. I'm porting C++
code over, and it has corrupted me. I'll adop
1 - 100 of 233 matches
Mail list logo