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 - ecraven

Pages: [1]
1
I just grab a texture which has all the letters. The constructor also takes a "mapping" from characters to indices. Otherwise I mostly copied the interface of sf::Font, returning an sf::Glyph, and not supporting italic/bold/...
I've never looked at other bitmap fonts, but I imagine it would be difficult to find a generic way to support them, but it might be possible to support at least the "letters on one texture" type (with some virtual functions for customisation).
If you are really interested, I could clean the code up some more and then post it. It's really nothing special though :)

For me, the most important point would be the change of making sf::Font a suitable base class to use, so that I can actually implement my own BitmapFont class without having to redo sf::Text and whatnot ;)

2
Audio / Re: Playing sf::Music of unknown total size
« on: June 26, 2014, 11:44:39 pm »
I think documenting it is enough at the moment, that way people can avoid the problem. We could create an issue, and just assign it a low priority, maybe someone can come up with a non-ugly workaround :)

This code runs fine for me, but I only tested gcc 4.9 under 64 bit linux. It's obviously a bug, thanks for enlightening me!

So there have to be at least two buffers? Might it be more transparent for the user if SFML internally just used two instead of three buffers, and the documentation mentioned that you *have* to return samples for every call of onGetData?

3
if you mean SFML, release.

4
Audio / Re: Playing sf::Music of unknown total size
« on: June 26, 2014, 08:44:49 pm »
this exhibits the problem:

raw data file: http://www.nexoid.at/tmp/foo.raw
program: http://www.nexoid.at/tmp/sfml-sound-problem.cpp

if you change line 33 (true <-> false) you see that it works correctly when all three buffers are filled, but not when only the first one is filled.

I hope this helps ;)

greetings

5
glxinfo says

direct rendering: Yes
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.4

I have Option "AccelMethod" "uxa" set for X11 also. I haven't enabled any debugging, that shouldn't be a problem. Also, this never happens with any other library or framework, which makes me suspect SFML does something my driver doesn't like :(

6
Hello :)

I have tried all the demos from the SFML book, a few existing projects, and some of my own SFML code, in all of them I experience the following:
About 2-3s after I start any SFML program, the window seems to freeze for about 0.5-1s, then things continue normally (no more freezes after that). Audio is not affected, only rendering.
The machine is an Intel i7-3770T with on-chip HD2000 (?) graphics card. System is Arch Linux, 64bit, 3.14.4.
SFML is git as of today (same problem on 2.1 release).
This does not happen on any other library or game I've tried so far.
Is there a way to help debug this? Has this happened to anyone else?

Thanks for any help!

7
Audio / Re: Playing sf::Music of unknown total size
« on: June 26, 2014, 04:15:32 pm »
Thank you! This is what I've been looking for.. now I just need to find out why onGetData isn't called after I return 0 samples twice in a row, but that's probably some problem on my side :)

I have a sample rate of 22050, I return about 23000 samples on the first call. that should be enough for 1 second. SFML calls onGetData again twice immediatly (where I return 0 samples both times, but a return value of true, to indicate there is more data coming). Then SFML never again calls onGetData, even though I have new data available every 1/15s, which would be plenty... I can't find a bug in my program, and I can't see anything strange in SoundStream.cpp, any ideas?

EDIT:
The problem seems to be that SFML internally uses 3 sound buffers. If I don't return all available data on the first call, but keep some for later, things work.
Is this considered a bug? Otherwise, some mention of this in the documentation might be helpful :)

Thanks to zagabar for pointing me in that direction!

8
Hello :)

I've implemented my own BitmapFont class as well as my own Text class. If sf::Font were to be an abstract base class (with all of its functions virtual), I could just have re-used sf::Text. Is this something you are willing to discuss? I'm *not* suggesting any standard form of bitmap font support, just to change sf::Font so that it is possible to re-use sf::Text (which I think is impossible now).

Thanks for any comments!

9
Audio / Playing sf::Music of unknown total size
« on: June 26, 2014, 12:34:23 pm »
Hello!

I'd like to play some legacy music. The file format does not contain a total size of the audio. I just know the number of channels, the sample rate and the bit depth. Is there a way to use an InputStream for this, or do I *always* have to know the exact total size? Decoding the entire file just to get the total size doesn't seem a good idea. Is there any way to decode and play this music "on the fly"?

Thanks for any help!

Pages: [1]
anything