What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread Sean Campbell via Digitalmars-d-learn
I cannot figure out what is wrong with this code and why i keep getting object.error access violation. the code is simple tutorial code for SDL and OpenGL what am i doing wrong (the access violation seems to be with glGenBuffers) The Code import std.stdio; import derelict.opengl3.gl3; import

Re: What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread Misu via Digitalmars-d-learn
Can you try to add DerelictGL3.reload(); after SDL_GL_CreateContext ?

Re: What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread bearophile via Digitalmars-d-learn
Sean Campbell: I cannot figure out what is wrong with this code and why i keep getting object.error access violation. the code is simple tutorial code for SDL and OpenGL what am i doing wrong (the access violation seems to be with glGenBuffers) I don't know where your problem is, but you

transposed problem

2014-07-04 Thread bearophile via Digitalmars-d-learn
Is this another bug in std.range.transposed? void main() { import std.stdio, std.algorithm, std.range; auto M = [[[1, 2]], [[3, 4]]]; M.filter!(r = r.dup.transposed.walkLength).writeln; M.filter!(r = r.transposed.walkLength).writeln; } Output with the latest dmd: [[[1, 2]],

Re: What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread Sean Campbell via Digitalmars-d-learn
On Friday, 4 July 2014 at 08:02:59 UTC, Misu wrote: Can you try to add DerelictGL3.reload(); after SDL_GL_CreateContext ? yes this solved the problem. however why? is it a problem with the SDL binding?

Re: What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread safety0ff via Digitalmars-d-learn
On Friday, 4 July 2014 at 09:39:49 UTC, Sean Campbell wrote: On Friday, 4 July 2014 at 08:02:59 UTC, Misu wrote: Can you try to add DerelictGL3.reload(); after SDL_GL_CreateContext ? yes this solved the problem. however why? is it a problem with the SDL binding? No.

Re: What am I doing Wrong (OpenGL SDL)

2014-07-04 Thread Mike Parker via Digitalmars-d-learn
On 7/4/2014 6:39 PM, Sean Campbell wrote: On Friday, 4 July 2014 at 08:02:59 UTC, Misu wrote: Can you try to add DerelictGL3.reload(); after SDL_GL_CreateContext ? yes this solved the problem. however why? is it a problem with the SDL binding? OpenGL on Windows requires a context be created

Re: transposed problem

2014-07-04 Thread bearophile via Digitalmars-d-learn
https://issues.dlang.org/show_bug.cgi?id=13041 Bye, bearophile

recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
After upgrading to latest dmd, I get the follow error on the code template Array(T) { alias Array = std.container.Array!T; } Error: Array!(iDataBlock).Array recursive alias declaration I don't see anything recursive about it... and the code worked before. Any ideas?

Re: recursive definition error

2014-07-04 Thread bearophile via Digitalmars-d-learn
Frustrated: After upgrading to latest dmd, I get the follow error on the code template Array(T) { alias Array = std.container.Array!T; } Try to use a different name inside the template, like Vector. Bye, bearophile

Re: recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 15:10:14 UTC, bearophile wrote: Frustrated: After upgrading to latest dmd, I get the follow error on the code template Array(T) { alias Array = std.container.Array!T; } Try to use a different name inside the template, like Vector. Bye, bearophile Huh? The

Re: recursive definition error

2014-07-04 Thread via Digitalmars-d-learn
On Friday, 4 July 2014 at 15:07:00 UTC, Frustrated wrote: After upgrading to latest dmd, I get the follow error on the code template Array(T) { alias Array = std.container.Array!T; } Error: Array!(iDataBlock).Array recursive alias declaration I don't see anything recursive about it... and

Re: recursive definition error

2014-07-04 Thread bearophile via Digitalmars-d-learn
Frustrated: Since there is no recursion going on there, it shouldn't be a problem. Yes, sorry. In dmd 2.066 this too could work: alias Array(T) = std.container.Array!T; Bye, bearophile

Re: recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 15:37:52 UTC, Marc Schütz wrote: On Friday, 4 July 2014 at 15:07:00 UTC, Frustrated wrote: After upgrading to latest dmd, I get the follow error on the code template Array(T) { alias Array = std.container.Array!T; } Error: Array!(iDataBlock).Array recursive alias

Re: recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 15:42:36 UTC, bearophile wrote: Frustrated: Since there is no recursion going on there, it shouldn't be a problem. Yes, sorry. In dmd 2.066 this too could work: alias Array(T) = std.container.Array!T; Bye, bearophile That just gives more errors. I'm not using

Re: recursive definition error

2014-07-04 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 4 July 2014 at 16:28:48 UTC, Frustrated wrote: On Friday, 4 July 2014 at 15:42:36 UTC, bearophile wrote: Frustrated: I'm not using 2.066 though... I will revert back to the dmd version I was using when it worked... Hopefully someone can make sure this is not a regression in the

Re: recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 16:31:28 UTC, Stanislav Blinov wrote: On Friday, 4 July 2014 at 16:28:48 UTC, Frustrated wrote: On Friday, 4 July 2014 at 15:42:36 UTC, bearophile wrote: Frustrated: I'm not using 2.066 though... I will revert back to the dmd version I was using when it worked...

Re: recursive definition error

2014-07-04 Thread Frustrated via Digitalmars-d-learn
On Friday, 4 July 2014 at 20:25:28 UTC, Frustrated wrote: On Friday, 4 July 2014 at 16:31:28 UTC, Stanislav Blinov wrote: On Friday, 4 July 2014 at 16:28:48 UTC, Frustrated wrote: On Friday, 4 July 2014 at 15:42:36 UTC, bearophile wrote: Frustrated: I'm not using 2.066 though... I will

Problem Linking Phobos git master

2014-07-04 Thread Nordlöw
On Ubuntu 14.04 my git master build script for phobos now fails as below. Why? Help please. /usr/bin/ld points to /usr/bin/ld.bfd on my system Terminal echo and error message follows: ../dmd/src/dmd -I/home/per/opt/x86_64-unknown-linux-gnu/dmd/include/d2 -shared -debuglib= -defaultlib=

Re: Problem Linking Phobos git master

2014-07-04 Thread Kapps via Digitalmars-d-learn
Possibly something related to: https://github.com/D-Programming-Language/dmd/pull/3715 Have you tried updating to git master today?