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

Pages: [1]
1
Oops, it was a problem with my browser.  It is working correctly.

2
The GCC 4.7 MinGW (DW2) - 32 bits SFML download link doesn't work for me.  I am getting this message from my browser when I click on it:

No data received

Unable to load the webpage because the server sent no data.

3
Audio / Re: Limit to number of simultaneous sounds/musics
« on: May 21, 2014, 07:55:51 am »
As long as the object exists, it counts.
Ok, thanks for the reply.

4
Audio / Limit to number of simultaneous sounds/musics
« on: May 21, 2014, 02:20:29 am »
The tutorial for sounds and musics states that there is a limit to the number of simultaneous sounds and musics.  My question is does a sf::Music object that is paused still contribute to this total?  What about if it is stopped?  Any information would be appreciated. 

5
Network / Re: How to download a video from a website?
« on: January 23, 2014, 08:25:54 pm »
Thank you.

6
Network / Re: How to download a video from a website?
« on: January 23, 2014, 05:51:51 pm »
Using std::ofstream, I give the file a name with the required ext:
sf::Http http;
http.setHost("http://assets.ign.com/");
sf::Http::Request request;     
request.setUri("/videos/zencoder/640/d092914f4631a98554ac9849165b5ee9-500000-1390433049-w.mp4");
sf::Http::Response response = http.sendRequest(request);       
std::string data = response.getBody();
std::ofstream fout("example.mp4");
fout << data;
fout.close();
 
I have tried this with .flv and .mp4 videos from various websites and get the same result - a file with extra bytes that doesn't play.

7
Network / How to download a video from a website?
« on: January 23, 2014, 06:58:40 am »
When I use the http functionalities of sfml, I can download videos, but I can't play them properly.  For example, if I send a request to http://assets.ign.com/videos/zencoder/640/d092914f4631a98554ac9849165b5ee9-500000-1390433049-w.mp4 , and save the response body as a file with the .mp4 extention, the file does not play when I open it with VLC player.  When I enter the uri into IE browser, it downloads and then plays properly.  It also works when I download it using URLDownloadToFile() in Visual Studio.  Also, the file downloaded with sfml is about .3MB larger, although I couldn't see any noticeable differences when I opened the files as .txt.  I also encountered this same problem when using libcurl.  Does anyone know is causing this problem?

8
Graphics / Re: How to check RectangleShape 's bounds with resizing window?
« on: December 31, 2013, 08:11:51 am »
What changes when you resize the window is the mapping between pixels and world coordinates, the shape itself doesn't change. You must use the function window.mapPixelToCoords to convert your mouse position.

Thank you.  That worked.  I had been trying mapCoordsToPixel instead of mapPixelToCoords.  Oops  :-[ .

9
Graphics / How to check RectangleShape 's bounds with resizing window?
« on: December 31, 2013, 07:37:47 am »
Hello, I am trying to build some simple GUI widgets in SFML 2.1.  I am using a RectangleShape as a text entry box.  When the user clicks the mouse, I check if it is within the RectangleShape 's GlobalBounds.  This check works as long as I don't resize the window.  If I resize the window, the displayed shape gets distorted, but the GlobalBounds remains unchanged.  Then when I click on the displayed rectangle, the mouseButton event's coordinates are not contained in the RectangleShape's GlobalBounds. 

I tried using the RectangleShape 's LocalBounds and the TextureRect, but those don't work either.  To be clear, I want to be able to resize my window and have the RectangleShape resize with it.  But when that happens, how can I check to see if a mouse click is within the bounds of the RectangleShape?

Pages: [1]
anything