Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Trass3r

Pages: 1 2 [3] 4 5 ... 7
31
D / up-to-date D bindings for the v1.5 C API
« on: October 08, 2010, 10:32:22 pm »
Derelict still focuses on 1.x until 2.0 is finally released.
1.5 or 1.6 shouldn't make that much of a difference since it is a bugfix release mostly.

32
D / up-to-date D bindings for the v1.5 C API
« on: September 12, 2010, 10:29:11 pm »
CSFML needs to "flatten" the API because C doesn't understand OOP. So it creates single functions like Sprite_SetX(Sprite* this, x)
A binding simply makes these C functions accessible from D by making the necessary function definitions.
DSFML "converts" this flat API back to an OO one so that you again have a Sprite class with methods and so on

33
D / Anybody using DSFML/DSFML2?
« on: September 12, 2010, 10:24:00 pm »
Quote from: "AndrejM"
Sorry for that brainfart. I initially thought I needed an import library, but DSFML uses dynamic loading but on application startup (is that correct?).

So I don't need to create any import libraries (and really I wasn't creating an import lib, that build script only creates a static library..).

It's really interesting how you've combined the use of mixins with DLL loading. :)

Yeah, dll loading is done dynamically at program startup. It's a bit of a construction site. Some time ago I thought about replacing it with static linking but in the end I do need function pointers to do the magic behind simulated class inheritance (see Drawable implementation)

Thank you for your work on the DFL example. I don't have much time at the moment but while still try to fold your changes in :)

34
D / up-to-date D bindings for the v1.5 C API
« on: September 04, 2010, 02:37:56 pm »
A binding is more or less a port of the header file to D so you can use the API.
A wrapper adds a layer on top of that to make it easier to use it, usually creating an OOP-based access model.

35
D / Anybody using DSFML/DSFML2?
« on: August 26, 2010, 09:36:50 pm »
Why would you want to build it?
I thought building the samples with xfbuild worked for you?

I get an OutOfMemoryError sometimes from it, but if I compile again it mostly works.

36
D / Anybody using DSFML/DSFML2?
« on: August 26, 2010, 08:00:56 pm »
Just leave the network samples alone for now.
Phobos usage examples don't belong in dsfml anyway :wink:

37
D / Anybody using DSFML/DSFML2?
« on: August 26, 2010, 07:13:52 pm »
Quote from: "AndrejM"
I've done a partial fix of the PostFX sample. I have a few problems however:

I haven't dealt with such things yet. Here's Laurent's explanation:
http://www.sfml-dev.org/forum/viewtopic.php?t=1791

Quote
This is one of those things that's different between D1 and D2. Are you still keeping D1 compatibility?

Nope. Also the few version(Tango) parts are just remains and probably don't even compile anymore.

Quote
At line 110 in my fix there was this call:
Code: [Select]
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:
Code: [Select]
app.draw(background, currentEffect);
But I don't know if this is correct.

Well all that Drawable and render() stuff is a little bit hacky :roll:

38
D / Anybody using DSFML/DSFML2?
« on: August 26, 2010, 10:11:34 am »
Quote from: "AndrejM"
Any idea what "PostFX" has been renamed to?

Shader

Quote
Speaking of which, is there a way in D to get all the names defined in a module and output it in some text file? Well I guess I would need an IDE for that.. but I prefer a text editor. ^^

Yep, Descent shows a list of all members while programming.

Quote from: "AndrejM"
Here's view.d:http://pastebin.com/UfmRMutf

There's some weird indentation next to if statements, but I left that as it is. I've replaced (hopefully all) calls to properties with the syntax obj.property and obj.property = value.

Thanks :D
The frame is incorrect though. The mouse is more in the middle of it when you drag. I fixed it, was a bug due to changed Rect layout.

Quote
is Pastebin an ok place to put these files? I don't know where else to host them.. I could use dropbox if you prefer that.

Totally ok.

Quote from: "AndrejM"
Here's sound3d.d:
http://pastebin.com/eZT3rk8S

The sound seems to loop for a while, but after a few seconds it stops. The app crashes on exit like the other audio modules. Otherwise it seems to work ok, I can move the car left-right and hear the stereo effect.

Indeed it stops :x

39
D / Anybody using DSFML/DSFML2?
« on: August 25, 2010, 11:16:25 pm »
Quote from: "AndrejM"
Do the examples crash for you as well?

Not so far. Do they always crash?

Quote
This makes the code much more readable, imo. All those parentheses are a thorn in the eye. :)

Yep, that's why I chose this path :)

40
D / Anybody using DSFML/DSFML2?
« on: August 25, 2010, 10:41:25 pm »
Quote from: "AndrejM"
Removing audio-related code in Pong will stop the app from crashing at exit. I couldn't hear the sound anyway so there's definitely something broken somewhere.

Sound perfectly works for me.

Quote
In that example code [soundstream.d], there's a MySoundStream class that inherits from the abstract class SoundStream.

Well most of the code in audio is still from old DSFML1 times because I've only used sound and music so far.
The soundstream example compiles now but doesn't play anything. Probably need to fix the whole dsfml soundstream module.

Quote
The module import/dsfml/audio/soundstream.d defines the abstract  SoundStream and the onSeek() method has these comments:

Code: [Select]

/**
* Called each time the stream is seeked
*/
abstract void onSeek();

/**
* Called each time the stream needs new data.
* This method will be call by an other thread, take care of possible synchronisation issues.
*
* Params:
* data = array of samples to stream
*
* Returns:
* true to continue streaming, false to stop
*/


If it returns a bool, it can't have a void return type. I had to make the implementing class define this method as a void because I can't redefine the return value of a method, since that is an error.

The second comment belongs to onGetData.

Quote
Here's the sample modules which I've edited so they compile:
pong.d

Thanks. I've edited them to really account for the property syntax though. Check my commit.
Code: [Select]
End.characterSize = 60; and so on

41
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 08:07:57 pm »
No. It used to compile without errors but Laurent restructured the whole package some time ago.

Currently I'm not inclined to fix this as its future in DSFML is still undecided.

Phobos should provide a way to do network communication and probably has a more sophisticated solution anyway. On the other hand SFML's simplicity approach might be a good alternative. I can't assess that though since I haven't used any networking stuff whatsoever.

42
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:42:03 pm »
I had weird errors in some projects that were solved by excluding them.
Furthermore Phobos is already precompiled so I don't know if it makes any sense at all not to exclude them.

43
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:29:14 pm »
Dunno, at least they are listed there: http://bitbucket.org/h3r3tic/xfbuild/wiki/Home
Although they say it's +x=pck instead of +xpck :?:

44
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:19:51 pm »
No, CMake is just used to build sfml and the csfml dlls on top of it.
Yeah the '-d' belongs to the filename, resulting in OpenBB-d.exe

45
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 11:49:40 pm »
Ok, btw Laurent is currently switching over to CMake.
At least the OpenGL example is still up-to-date :)

Pages: 1 2 [3] 4 5 ... 7