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

Pages: 1 ... 601 602 [603] 604 605 ... 733
9031
Graphics / Re: RenderTextures and dynamic memory
« on: January 13, 2013, 01:21:40 am »
Could you please provide complete and minimal example?

Because from the text and the posted source it's not clear when the RenderTexture gets deleted.
Also could you specify what you mean by "the screen is never cleared, and nothing ever renders"?

Why do you have to allocate the render texture dynamically?
Have you ever considered using a smart pointer/RAII over manual calling delete? For instance if the posted code failt to create the texture, but the render texture got created, the the render texture will never get deleted, since you directly return with -1 and thus you create a memory leak. Maybe you could talk a look at this discussion.
(Disclaimer: It doesn't mean it would fix the problem, but it would just make your code safer.) ;)

9032
Window / Re: Help with mouse clicks?
« on: January 13, 2013, 12:17:29 am »
And for further reference, SFML has one of the best maintained documentations.

Also please make sure to use the code=cpp tag, when posting code.

9033
General / Re: SFML 2.0 Performance Issues under Windows 8
« on: January 12, 2013, 11:27:25 pm »
Our game runs well on windows 8 (and it's realy heavy), no problems.
Be sure to run tests on computer (Windows Experience Index)
The problem has already been fixed. ;)

Read before posting... ::)

9034
General / Re: SFML 2.0 Performance Issues under Windows 8
« on: January 12, 2013, 07:37:34 pm »
Actually, strangely enough, HD5470 is correct :).
Hmm okay, well DELL only listed the other graphics card for the said notebook... ;)

just thought it was strange that SFML 1.6 applications ran fine, but SFML 2.0 ones didn't.
Well the graphics module of SFML got nearly completly rewritten, so a lot has changed, but I don't know enough about the inner-workings to get an idea, why SFML 1.6 ran fine while SFML 2.0 doesn't.

9035
Window / Re: Window changing position
« on: January 12, 2013, 07:14:45 pm »
What happens if you set the position before creating the window?
If that doesn't work, then you probably can't do anything about it.

9036
Audio / Re: Playing raw audio data from a DDP
« on: January 12, 2013, 07:11:54 pm »
From the for everyone publicly available and easy to read documentation:
Quote
bool sf::SoundBuffer::loadFromMemory (const void * data, std::size_t sizeInBytes)
   
Load the sound buffer from a file in memory.

Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.

It's now your job to determine if that DDP file matches any of the supported formats. This can either be done, by reading more about the format or simply testing it. ;)

9037
And can you tell me how I can go about setting the subsystem to windows instead of console and then link against sfml main?
If you go with the terminal directly, then you'll have to add the compile flag: -mwindows and the linker flag lsfml-main.
So in the end your complete command would look like:
g++ test.cpp -o sfml-app -mwindows -ISFML/include/ -LSFML/lib/ -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

Btw. for the debug version, you'll also have to link against the debug SFML libraries (the ones with the suffix -d).

9038
However, can someone explain why now it doesn't require libgcc_s_dw2-1.dll and libstdc++-6.dll?
If you run it from with in the MSYS, then it will already have the compiler's binaries in PATH, which includes libgcc and libstdc++.
The other explanation would be, that the libs got linked statically.

Also, is there a way to hide the command prompt that pops up after I open the program?
You have to set the subsystem to windows instead of console and then link against sfml-main.
For debugging purposes I advise you though to keep the console, so you see SFML's, OpenGL's and your own error messages.

9039
General / Re: SFML 2.0 Performance Issues under Windows 8
« on: January 12, 2013, 05:22:52 pm »
3) 2010 Dell Studio 15, Core i5 Laptop running Windows 7, ATI Mobility Radeon 5470, 4GB DDR3 RAM
Didn't you mean ATI Mobility Radeon 4570?
- Pretty sure all drivers are up to date for the graphics card. (Used Windows to detect to find the drivers, since the card is a little old and it's hard to actually get compatible graphics drivers from ATI for Windows 8)
Personally I wouldn't be satisfied with 'pretty sure' and even less with 'just' then Windows update function.
Windows 7 and 8 should be compatible regarding drivers and it's not too hard to get hold of the official driver for your DELL notebook: ATI Mobility Radeon HD 4570
Additionally it might be even better to get to the official ATI website: AMD Catalyst™ Driver for the Radeon™ HD 4000

I'm sorry I wasn't clear previously. Yes, the frame rate drops to 1-2 frames per second. It's just a little bizarre because the exact same code works fine across so many different machines and operating systems, but just completely unplayable on Windows 8, on the exact same machine.
This all sounds like a driver issue, rather than anything else.

You could also try some other OpenGL applications. ;)

9040
Audio / Re: [SFML] Audio file won't load
« on: January 12, 2013, 10:10:23 am »
I have checked it.
C:\Users\Brukmoon\Documents\Visual Studio 2010\Projects\SFML\Release
Which is wrong, unless you've changed it manually in the project settings.
The default working directory with Visual Studio is next to the project file, in your case I'd say you'll have to put all the resources into the following directory:
C:\Users\Brukmoon\Documents\Visual Studio 2010\Projects\SFML

What does the console output say?
As I've stated before the application compiles and links well, no errors/warning at all, build successful. It just won't open the file even thought it should.
I wasn't talking about the compiler out here, I referred to the console output by the application. When the loading fails, then you'll always get a debug output on std::err, which will tell you what exactly went wrong. In your case it would probably state that the audio file couldn't have been found.

For example with the following code, your application doesn't just simply close when the loading fails, but it waits for 5 seconds, so you'd be able to read the error message.
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
#include <iostream>

int main()
{
        sf::RenderWindow window(sf::VideoMode(sf::VideoMode::getDesktopMode()), "SFML");
        sf::SoundBuffer buffer;
        if (!buffer.loadFromFile("mainMusic.wav"))
        {
                std::cout << "Error while loading music" << std::endl;
                sf::sleep(sf::seconds(5));
                return -1;
        }
        sf::Sound sound;
        sound.setBuffer(buffer);
        sound.play();
        while(window.isOpen())
        {
                sf::Event event;
                while(window.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                                window.close();
                }
        }
}

Btw. you should always post code with the tag code=cpp. ;)

9041
General / Re: SFML 2.0 Performance Issues under Windows 8
« on: January 12, 2013, 09:59:13 am »
I've been running SFML 2 applications on Windows 8 now for quite a while and never experienced any issues.

As for your problem, I don't think we can really give you any hints, since the description is way too cryptic.
Can you define 'extremely choppy'? Is this just a low FPS count? Does it happen to any example run with SFML or just with your code?
Then of course the questions also arise about the drivers of the hardware. Are they native Windows 8 drivers? Are they fully up-to-date (specially the graphics driver)?

Btw. GCC 4.4.1 is around 3.5 years old, have you ever considered to upgrade to a newer version? The current MinGW projects provides version 4.7.2, which is only four month young. ;)

9042
Feature requests / Re: sf::Sprite::FlipX/Y
« on: January 12, 2013, 12:14:12 am »
The change of IntRect and FlipX/Y are not really comparable, since IntRect was changed, because of its more logical use x,y,width,height while not affecting the performance in calculating the 'third' information (instead of x2-x1 = width you now get x1+widht = x2).

FlipX/Y on the other hand was removed to clean-up the API and remove redundant functionalities. Since one can simply set a negative scale factor to flip a sprite and the scale function gets implemented anyway, the FlipX/Y just aren't needed anymore.

Arguing about simplicity of FlipX/Y vs. scale with negative factor isn't very strong, since both ways have the same simplicity to use.

The only argument I see as valid, is that FlipX/Y would be more descriptive than the scale function. But I happily take a cleaner API over a small bit of readability. ;)

9043
Feature requests / Re: sf::Sprite::FlipX/Y
« on: January 11, 2013, 11:12:07 pm »
So you actually already know, that the feature request won't be accepted, but you still ask for it? ::)

9044
Audio / Re: "SoundBuffer* s = new SoundBuffer;" freezes the application
« on: January 11, 2013, 10:26:20 pm »
Is there any way I can keep the same syntax using a singleton or a non-global object?
Well one should always try to avoid globals, it's in mostly all cases just a bad design, which can quickly lead to fatal errors.
I strongly advise against (mostly) all sorts of globals and specially the singleton-pattern.

But if you really, really, really, really want to, you can have global accessible objects, but you can't initialize them in the global scope. Thus declare the object in the global scope but initialize it for instance in main().

9045
Audio / AW: [SFML] Audio file won't load
« on: January 11, 2013, 10:05:12 pm »
What does the console output say?
With 'all needed DLLs' do you also mean openal and libsndfile?

Pages: 1 ... 601 602 [603] 604 605 ... 733
anything