dsfml\window\event.d has a typo,
line 111 in the enum KeyCode:
Substract,
should be
Subtract,
dsfml\window\context.d has an import to a missing file at line 29:
import dsfml.window.common;
Removing it compiles the libraries (I have removed that before when I compiled the lib but I forgot to mention it).
I've done a partial fix of the PostFX sample. I have a few problems however:
1. I had to change the EFFECTS type to string[5]. This was a char[][5] type before, but I couldn't compile the lines that called Text.text(), which takes a string as it's argument, for example:
curFXStr.text("Current effect is " ~ EFFECTS[actualIndex]);
The literal is a string type (array of immutable chars), but EFFECTS would be a char[], and the compiler can't convert this to a string implicitly. An alternative is to use to!string from std.conv, but that's overkill imo.
This is one of those things that's different between D1 and D2. Are you still keeping D1 compatibility?
2. At line 110 in my fix there was this call:
app.draw(currentEffect);
I haven't found a draw method that directly takes a shader, and the one I found needs an IDrawable as a first argument. So I tried to pass it the background, which makes the code compile:
app.draw(background, currentEffect);
But I don't know if this is correct.
3. The example crashes on entry, and I seem to get almost chopped out text (e.g. "framebuffe" instead of "framebuffer") in the errors:
C:\sfml2\DSFML\samples\dsfml\bin>postfx
Failed to compile shader:
0(4) : error C0000: syntax error, unexpected '{' at token "{"
0() : error C0501: type name expected at token "{"
0(4) : warning 7022: unrecognized profile specifier "effect"
0(4) : warning C702: unrecognized profile specifier "framebuffer"
0(4) : warning C022: unrecognized profile specifier "texture"
0(6) : error C0000 syntax error, unexpected '}' at token "}"
0(6) : error C0501: tpe name expected at token "}"
Failed to compile shader:
0(2) : warning C7022: unrecognized profile specifier "framebuffe"
0(2) : warning C7022: unrecognized profile specifier "texture"0(2) : error C0502: syntax er
ror at token "texture"
0(4) : errorC0000: syntax error, unexpected identifier, expecting ',' or ';'at token "effec
t"
0(4) : error C0501: type name expected at toke "effect"
0(4) : error C1014: "effect" is not a function
(15) : atal error C9999: *** exception during compilation ***
Failed to compile shader:
0(2) : warning C7022: unrecognized profile specifier "framebuffe"
0(2) : warning C7022: unrecognized profile specifier "texture"0(2) : error C0502: syntax er
ror at token "texture"
0(4) : errorC0000: syntax error, unexpected identifier, expecting ',' or ';'at token "effec
t"
0(4) : error C0501: type name expected at toke "effect"
0(4) : error C1014: "effect" is not a function
(9) : ftal error C9999: *** exception during compilation ***
Failed to compile shader:
0(2) : warning C7022: unrecognized profile specifier "framebuffe"
0(2) : warning C7022: unrecognized profile specifier "texture"0(2) : error C0502: syntax er
ror at token "texture"
0(4) : errorC0000: syntax error, unexpected identifier, expecting ',' or ';'at token "effec
t"
0(4) : error C0501: type name expected at toke "effect"
0(4) : error C1014: "effect" is not a function
0(6) : rror C1115: unable to find compatible overloaded function "distace(error, vec2)"
(11) : fatal error C9999: *** exception during ompilation ***
Failed to compile shader:
0(3) : warning C7022: unrecognized profile specifier "wave"
0(3): warning C7022: unrecognized profile specifier "texture"
0(3) :warning C7022: unrecognized profile specifier "framebuffer"
0(3): error C0502: syntax error at token "framebuffer"
0(5) : error 0000: syntax error, unexpected identifier, expecting ',' or ';' t token "effec
t"
0(5) : error C0501: type name expected at token"effect"
0(5) : error C1014: "effect" is not a function
(11) : ftal error C9999: *** exception during compilation ***
object.Error: Access Violation
[/list]
Here's the sample module (you'll have to fix the 2 lib files as above and recompile the lib before compiling the example):
http://pastebin.com/d6fedtzY