On Thursday, 4 August 2016 at 21:02:59 UTC, TencoDK wrote:
Hey,
I'm using DerelictSFML2 + CSFML, I have stuck on instantiating
window.
derelict/window.d (binding from C):
struct sfWindow;
my_file.d:
sfWindow* sfmlWindow = null;
sfmlWindow = new sfWindow; // ???
This code snippet gives me:
Error: struct derelict.sfml2.window.sfWindow unknown size
How must I create stuctures from C bindings?
Looks like I found a solution. Too much C++ lately %)
sfmlWindow = sfWindow_create(
sfVideoMode(800, 600),
"Engine demo",
sfTitlebar | sfClose,
new sfContextSettings( 0, // depth bits
0, // stencil bits
0, // antialiasing
4, // major
3) // minor
);