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

Pages: [1]
1
General discussions / What's involved with making a new binding for sfml?
« on: September 11, 2010, 08:47:53 pm »
Yeah, I was planning on using the 1.6 version initially, until the 2.x version is finished being ported.  I don't know anything about osx and opengl, but I am on several apple mailing lists, including the cocoa, quicktime, and darwin, all of which sometimes talk about opengl stuff.  If you want to contact me offlist, we can pool our resources, and see what can be done.  I'm of course willing to assist, since I'd really like to get version 2.x ported.
Quote from: "Hiura"
Well, I know nothing about Pascal and the related stuffs. But, as you said, you need to use the C-binding. And the C-Binding needs «original» SFML framework (C++), which I'm currently trying to port for OS X.

So I won't be able to help you in your work. But maybe YOU can help me!  :)

(I got some trouble with the Graphics module : I cannot display some sf::Drawable for some unknown reasons. So if you're good at OpenGL and OS X frameworks that would be very nice.)

Or maybe you're planning on creating the binding for SFML 1.x only (then you already have a usable version of SFML for mac) :?:

2
General discussions / What's involved with making a new binding for sfml?
« on: September 11, 2010, 12:02:20 am »
I'd like to create sfml bindings for use with pascal on osx.  Ideally, the bindings would work with both fpc and gpc, but one or the other is fine as well.  My question:  What do I need to do to make sfml usable from either of these compilers? If I need to translate the c headers to pascal, that's fine, but I'm not sure if that's necessary (especially with gpc) so, if anyone has any suggestions/ideas, (of course, saying ask on the gpc forums is ok) I could really use this port.  Also, does anyone have any idea what work would be required to make the python bindings work on OSX? If anyone knows, and can let me know, I'd be more than happy to do the work, I just need some pointers/assistance on getting started on these things.
(oh, I'll do the perl bindings for osx too once I figure out how) :)

3
General / cannot render this glyph format
« on: August 24, 2010, 02:26:10 am »
I had an error
Failed to load font from disk (cannot render this glyph format)
but after looking at this thread,
http://www.sfml-dev.org/forum/viewtopic.php?t=1545&highlight=cannot+render+glyph+format
I moved the font loading code after the window creation, and now the loading from disk error went away, but I still have a load from memory error instead.  I'm not trying to load from memory, so I'm assuming this is something the lib does internally, but why would it spit out this error if the file is obviously present?
Needless to say, anything rendered with this font writes nothing to the screen, so if someone has some ideas, I'd sure appreciate them.  Using osx 10.5, sfml1.6, and gcc 4.04.
Thanks.

4
Graphics / Rotating images on OSX (10.5) and sfml 1.6
« on: August 13, 2010, 11:59:22 pm »
Quote
You should always clear the screen before drawing anything. If you don't need to do it for other transformations, it means that the new size/position completely overlaps the pixels previously taken by the sprite.

Ahh, gotcha.  That makes sense, sorry I didn't think of that, should have realized that was what was happening.
Quote
What does the SaveToFile function return? If it's true, then the image was successfully created, but it is maybe not located where you think it is ;)

Again, you were right on this one too, (though not as you thought) :) The key I was using to do the file save apparently is another one used by osx.  When I changed it to something else, it worked properly.  Your idea to show the status of the save to see if it was successful gave me absolutely nothing in return, so at that point, I figured out that osx was taking my key.  Changing the key used for the function solved the problem.
Whew, kind of a hassle competing with the os for key realestate. :-).
Thanks for your help, I'm sure there will be more when I get to adding additional features that aren't built-in by default.

5
Graphics / Rotating images on OSX (10.5) and sfml 1.6
« on: August 12, 2010, 08:27:06 pm »
Quote from: "Laurent"
Hi

As far as I know, there's no such a bug in SFML 1.6 on Mac OS X. You should show us a complete and minimal code that reproduces this problem.


I managed to get most of the issues solved.  The expanding/compressing the picture was due to using increments too small, then resetting the values before the next attempt to resize.  That part works now.  The problem with having the screen break into shapes was a result of spaces launching (osx by default uses f8 for spaces) I've turned that off, so that works too.
However, I'm still having the problem of artifacts when rotating.  With all other functions, I don't need to clear the screen or update background or anything, just app.draw(sprite) and app.display() and the new image gets displayed properly.  I'm told that when rotating though, the picture gets duplicated, (or at least portions of it do anyway) and that's where the confusion for my daughter was coming from.  Is there something else I should be doing to make sure the screen gets updated properly upon rotate that isn't necessary on increasing/decreasing size, or moving the picture around?


Quote from: "Laurent"
Quote
although trying to save the newly flipped/reversed image doesn't work either

You flip the sprite, but the source image remains the same ;)


Right, which is why I assigned the new sprite to another image, then try to save that image.  (actually, I was initially using the screen capture function to grab the picture, but that doesn't work either)
I get no file output at all either from screen capture then savetofile, or from assigning a new sprite, then savetofile.
The screen capture code I use was taken directly from the tutorial on sprites on the sfml documentation page.  The assign to sprite then save was my own code, but it doesn't work either, so not much point in posting. :)
So, any and all assistance is appreciated.
(btw, it's really hard making graphical programs when you gotta rely on what others say about the screen) :-).

6
Graphics / Rotating images on OSX (10.5) and sfml 1.6
« on: August 12, 2010, 05:20:35 am »
I'm having some trouble with a program I was putting together for my wife, just some quick graphical functions, such as flipping, rotating, shading, etc.  It seems that rotating is broken on osx using sfml 1.6 (or I'm doing something wrong)
When I call the code to rotate a sprite 90 degrees, it does nothing the first time, a second attempt splits the image into two, and subsequent pairs of calls produce another image.  Rotating the other direction undoes the buplicates, but still, no rotation takes place.
Am I doing something wrong? I don't initialize any parts of the sprite, everything is left at the loaded defaults.
Also, when I call resize on the sprite, increasing the y value by 0.1 units, the picture breaks up into a scattering of shapes (mostly squares).  I can't explain it any better than that, because that's all my Daughter says about it, and she's only 5, but my wife confirmed that's the behavior (whatever that means).
So, should I be initializing the the sprite values to something particular to stop this behavior, or is there a bug in the osx version of 1.6 sfml libs? And if so, how do I get around it (calling opengl directly?)
The picture I'm using is one from:
http://commons.wikimedia.org/wiki/File:Crude_Blue_Parrot.png
Just displaying the parrot works just fine, flipping the x or y axis works fine, although trying to save the newly flipped/reversed image doesn't work either.  I couldn't get anyone to tell me what the error message said, though I'll keep working on that one.  I realize that part isn't terribly helpful, but I thought I'd toss it in just in case it's relevant.  Only increasing the y value by 0.1 causes graphical misbehavior, and as I said, trying to rotate it does nothing until it's been rotated more than once.  Any assistance would be appreciated, and please be specific, as code is all I have to work with, since the graphics aren't for my benefit, since I can't see them anyhow. :)

7
Audio / Reusing sound buffers with new data
« on: July 28, 2010, 05:04:37 pm »
Quote from: "Laurent"
You talk about buffers (sf::SoundBuffer), but it looks like you mean "sounds" (sf::Sound). So what exactly are you talking about?


Fair enough, so same question, but with the sounds themselves instead of their buffers.
Basically, how to release memory used by one sound, (whether that be buffer or sound) until needed later.
I.E. load sound1, play it, unload sound 1, then some time later (a minute, an ahour, whatever) load a new sound and play it, but in the in between time, release the memory used by the first sound so there's no wasted memory during the interval.
Does the buffer actually use memory? or is it just a pointer to the sound itself?
And, if the buffer is truly only a pointer, then how to reinit the sound to eliminate it's memory footprint. (unload the sound I guess)
Apparently, these are rather large sounds, but streaming them is too slow, so loading one or two at a time is all the memory that he wants to use.

8
Audio / Reusing sound buffers with new data
« on: July 28, 2010, 05:39:04 am »
Not for me, but someone has asked me how to reuse buffers in sfml, and as far as I can tell, it's not doable.  Could someone confirm/deny this for me.
The scenario is this:
1. Load a audio file (works)
2 Assign it to a buffer (works)
3 Play said audio snippet (works)
4 deallocate memory used for buffer (I.E. set buffer to null)
5 load new sound
6 assign to previously used buffer w/o making a new one (I think Sound.SetBuffer() does this)

Basically, I think the question is whether or not buffer content can be deallocated until reinitialized at a later time.
The purpose (I think) is to load audio files, play them, then move to new levels, and reload the buffers with new sounds without using any additional memory.
Is there something other than SetBuffer that can be used to nullify a buffer until it's services are required again?
For my purposes, simply reassigning the buffer seems to be perfectly acceptable, but I'm being asked how to free memory used by a buffer w/o loosing the buffer itself.
Dunno how to do that (yet) so if anyone has ideas/suggestions/hard facts, I sure would be happy to pass them on. :)
Thanks.

9
General discussions / Mac OS X port to be continued
« on: July 27, 2010, 10:40:09 pm »
Actually, blind folks who need speech already have a screen reader, so it's not really useful in that regard.  I was thinking more along the lines of saving the developer time and trouble, in that they wouldn't need to record sound files for characters talking, they could just generate the speech on the fly, saving both disk space, and memory.  It would also allow developers to get prototype
Quote from: "Laurent"
A text-to-speech API is not really on the todo-list.

It would obviously be helpful for blind people, but what other purpose could it have? Moreover, those system-specific APIs probably use the same voice file format.

10
General discussions / Mac OS X port to be continued
« on: July 21, 2010, 07:12:06 am »
Quote from: "Laurent"
Quote
But there are still Audio and Network modules which are not depending on Window.

Network and Audio don't need to be ported ;)



Any thought about adding speech generation (text-to-speech) capabilities to sfml?  Osx has a rather robust speech synthesizer api, and it could easily be rolled into the sfml libs.  Windows has sapi which could be rolled to do the same job, and I haven't used linux in years, but I'm pretty sure they have some speech components that could be used for the process as well.  Obviously, the details would vary from os to os, but basic text-to-speech capabilities should be doable on all platforms.

Sorry about the windows code, can't help there, (too graphical in nature for me) but I'd not mind giving the text-to-speech modules a crack.

11
General discussions / Mac OS X port to be continued
« on: July 20, 2010, 05:41:29 am »
Quote from: "Laurent"
Quote
An interesting training exercise would be to port it to BSD (unless it already works on there) although doing that solo would require more time than I have.

SFML should work on BSD, except for the joystick part which is a little bit different from regular Linux, and undocumented.

If it works on osx, it should work on bsd (minus the cocoa code) since osx is derived from bsd.  I'd like to offer my assistance in porting 2.0 to osx.  I know this has had a lot of postings, and I know I can't do a complete port, since I'm blind, and using the Xcode tools is damned near impossible for me, but I'm an excellent code hacker, and I've ported several packages from other unix-type oses (and dos) to osx in the 5 years I've had my mac, so as long as you don't ask for graphical work, I can do just about anything else, including compiling final releases (I have both intel and ppc machines, laptops, minis and imacs (we're a mac family here) and I have an apple Developer Id, so asking support questions of apple isn't a problem.  If someone else can build the gui components of the port, (buttons, menus, views and the like) I can handle the code behind them with only minor difficulty.  I'm not sure my skills are up to porting something as complex as sfml, but I sure don't mind giving it a shot, perhaps if someone else who has a mac could do the graphical parts, I could handle the rest (possibly) I know that's not exactly what you were after, but if it will get the port done faster, I'll do what I can to assist.
Only thing is, no snowleopard machines yet (gotta upgrad the memory in my macbook first) but we do have both tiger and leopard machines here.
If someone could point me to the source that needs ported, I can certainly take a crack at it, who knows, maybe I can get some of it working.
hth.

12
Audio / positional sound under osx
« on: March 20, 2010, 03:24:22 am »
Quote from: "Laurent"
Spacialization only works with mono sounds.

Yeah, after testing with some mono samples, I found that it did indeed behave as advertised.  Now to try the 3d type stuff.
This is pretty cool, thanks for the work on this.  I think I've found the library I'll be using for my osx sound development.  I'm thinking universal sound player (yeah, I know, they already exist, but it's always cool to have your own) tie into apple apis to play the stuff they support, then use sfml to handle the stuff they don't (such as voc) Very cool that.

13
Audio / positional sound under osx
« on: March 17, 2010, 07:32:09 pm »
Well, I had a post here about being unable to get positional audio to work on osx, but I didn't try a mono sample, more later after I've tried that.

Pages: [1]