V Sun, 07 Feb 2016 23:47:39 +
Matt Elkins via Digitalmars-d-learn
napsáno:
> On Sunday, 7 February 2016 at 23:11:34 UTC, anonymous wrote:
> > On 07.02.2016 23:49, Matt Elkins wrote:
> >> Oi. Yes, I can, but it is quite a lot of code even if you
> >>
On Sunday, 7 February 2016 at 02:46:39 UTC, Marco Leise wrote:
My code would not see much ref counting in performance critical
loops. There is no point in ref counting every single point in
a complex 3D scene.
I could imagine it used on bigger items. Textures for example
since they may be used
On Saturday, 6 February 2016 at 22:51:45 UTC, cy wrote:
auto e = somethingThatFails()
scope(failure) cleanup(e);
makes more sense to me, since it's blatantly obvious that the
construction (and entering) process isn't covered by the
cleanup routine.
Not sure what you mean by that.
On Sunday, 7 February 2016 at 12:55:30 UTC, Whirlpool wrote:
Is it the same kind of problem as before ? If my understanding
is correct [1], I need to link with the OpenGL DLL, don't I ? I
found that I have an opengl32.dll file in C:\Windows\System32,
and tried adding the path to it in the
On Sunday, 7 February 2016 at 14:04:49 UTC, Mike Parker wrote:
Another point to make is that if you need deprecated functions,
DerelictGL3 is not what you want. You should import
derelict.opengl3.gl and use DerelictGL.load/reload instead. It
includes all of the deprecated functions. Just
Hi,
Sorry, I have a problem again :)
I tried to compile this example :
http://www.glfw.org/docs/latest/quick.html#quick_example
which required to add derelict-gl3
My code is currently this : http://pastebin.com/A5seZmX6
It compiles without errors, but crashes immediately with again
On 2016-02-06 14:33:57 +, Marc Schütz said:
I don't see why this wouldn't work, if you've in fact covered all combinations.
It works, the problem was that castSwitch returns something and I
didn't "catch" it.
It's similar to how castSwitch is implemented, though the double casts
are
The specification doesn't list (non-static) members a valid
template alias parameters:
http://dlang.org/spec/template.html#TemplateAliasParameter
On Sunday, 7 February 2016 at 19:43:23 UTC, rsw0x wrote:
On Sunday, 7 February 2016 at 19:39:27 UTC, rsw0x wrote:
On Sunday, 7 February 2016 at 19:27:19 UTC, Charles Hixson
wrote:
If I define a shared ulong variable, is increment an atomic
operation?
E.g.
shared ulong t;
...
t++;
It seems
On Sunday, 7 February 2016 at 21:49:24 UTC, Matt Elkins wrote:
I've been experiencing some odd behavior, where it would appear
that a struct's destructor is being called before the object's
lifetime expires. More likely I am misunderstanding something
about the lifetime rules for structs. I
On Sunday, 7 February 2016 at 19:27:19 UTC, Charles Hixson wrote:
If I define a shared ulong variable, is increment an atomic
operation?
E.g.
shared ulong t;
...
t++;
It seems as if it ought to be, but it could be split into read,
increment, store.
I started off defining a shared struct,
On Sunday, 7 February 2016 at 20:25:44 UTC, Minas Mina wrote:
On Sunday, 7 February 2016 at 19:43:23 UTC, rsw0x wrote:
On Sunday, 7 February 2016 at 19:39:27 UTC, rsw0x wrote:
On Sunday, 7 February 2016 at 19:27:19 UTC, Charles Hixson
wrote:
[...]
I've been experiencing some odd behavior, where it would appear
that a struct's destructor is being called before the object's
lifetime expires. More likely I am misunderstanding something
about the lifetime rules for structs. I haven't been able to
reproduce with a particularly minimal
On Sunday, 7 February 2016 at 22:35:57 UTC, anonymous wrote:
On 07.02.2016 23:07, Márcio Martins wrote:
The destructor you are seeing is from the assignment:
m_tileView = TileView(...);
This creates a temporary TileView, copies it to m_tileView,
and then
destroys it. I suppose you want to
On Sunday, 7 February 2016 at 19:39:27 UTC, rsw0x wrote:
On Sunday, 7 February 2016 at 19:27:19 UTC, Charles Hixson
wrote:
If I define a shared ulong variable, is increment an atomic
operation?
E.g.
shared ulong t;
...
t++;
It seems as if it ought to be, but it could be split into
read,
Thank you very much for your explanations and patience :) I
indeed have an AMD Radeon HD 7870 card, and using 4.4 as the max
version fixes my problem !
On 07.02.2016 22:49, Matt Elkins wrote:
From this non-reduced situation, does anything jump out? Am I missing
something about struct lifetimes? This is the only place I instantiate a
TileView.
Looks weird. I presume this doesn't happen with simpler constructor
parameters/arguments, like int
On 07.02.2016 23:07, Márcio Martins wrote:
The destructor you are seeing is from the assignment:
m_tileView = TileView(...);
This creates a temporary TileView, copies it to m_tileView, and then
destroys it. I suppose you want to move it instead. You need to copy the
handles from the temporary
On Sunday, 7 February 2016 at 22:04:27 UTC, anonymous wrote:
On 07.02.2016 22:49, Matt Elkins wrote:
From this non-reduced situation, does anything jump out? Am I
missing
something about struct lifetimes? This is the only place I
instantiate a
TileView.
Looks weird. I presume this doesn't
If I define a shared ulong variable, is increment an atomic operation?
E.g.
shared ulong t;
...
t++;
It seems as if it ought to be, but it could be split into read,
increment, store.
I started off defining a shared struct, but that seems silly, as if the
operations defined within a shared
On 07.02.2016 23:49, Matt Elkins wrote:
Oi. Yes, I can, but it is quite a lot of code even if you don't count
that it is dependent on OpenGL, GLFW, and gl3n to run to this point.
This is why I was disappointed that simpler reproducing cases weren't
appearing. I should probably spend more time
On Sunday, 7 February 2016 at 23:11:34 UTC, anonymous wrote:
On 07.02.2016 23:49, Matt Elkins wrote:
Oi. Yes, I can, but it is quite a lot of code even if you
don't count
that it is dependent on OpenGL, GLFW, and gl3n to run to this
point.
This is why I was disappointed that simpler
Some environment information:
DMD 2.070 32-bit
Windows 7 (64-bit)
Right now I'm using a logical ||:
if (!(2*PI - EPS!float <= t1-t0 || t1-t0 <= 2*PI + EPS!float)) {
But I'll be doing this a lot, so was wondering if there's a D
native way of doing it.
Thanks.
Thanks, that's what I needed to know.
I'm still going to do it as a class, but now only the inc routine needs
to be handled specially.
(The class is so that other places where the value is used don't even
need to know that it's special. And so that instances are easy to share
between
On Monday, 8 February 2016 at 02:47:24 UTC, Enjoys Math wrote:
Right now I'm using a logical ||:
if (!(2*PI - EPS!float <= t1-t0 || t1-t0 <= 2*PI + EPS!float)) {
But I'll be doing this a lot, so was wondering if there's a D
native way of doing it.
Thanks.
Currently I have:
@property T
On Monday, 8 February 2016 at 03:09:53 UTC, Enjoys Math wrote:
was wondering if there's a D
native way of doing it.
That is the D native way of doing it, but you could clean up a
lot of the boilerplate with some more templates. Also, || tests
for exclusion, as in whether something is NOT in
I have several class members:
Arc[4] arcs;
Arc[4] arcs_2;
and Id like to initialize them with the same function, so how do
I "pass them in" by reference?
On Monday, 8 February 2016 at 05:59:43 UTC, Enjoys Math wrote:
I have several class members:
Arc[4] arcs;
Arc[4] arcs_2;
and Id like to initialize them with the same function, so how
do I "pass them in" by reference?
void foo(ref Arc[4] arr)
{
…
}
The dimension can of course be
On Monday, 8 February 2016 at 06:01:24 UTC, Jakob Ovrum wrote:
On Monday, 8 February 2016 at 05:59:43 UTC, Enjoys Math wrote:
I have several class members:
Arc[4] arcs;
Arc[4] arcs_2;
and Id like to initialize them with the same function, so how
do I "pass them in" by reference?
void
On Saturday, 6 February 2016 at 23:35:17 UTC, Ali Çehreli wrote:
On 02/06/2016 10:05 AM, Voitech wrote:
> [...]
You can use string mixins (makeCtor and makeCtors):
string makeCtor(T)() {
import std.string : format;
[...]
Thank you very much for answering.
Cheers
31 matches
Mail list logo