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

Pages: 1 ... 7 8 [9]
121
General / Re: Continuous sprites
« on: November 07, 2012, 06:03:14 am »
But that doesn't explain everything in my opinion, read them though or you won't

Almost every graphical engine works with 2 screens. One that is actually displayed on your window and the other one in the background, not visible. You always work on the background, so if you call draw(), you won't draw it in your window, but in the background. Same applies for clear(). The function display() switches background to foreground, so everything you've just drawn will be visible.
With that in mind you should be able to work it out.

122
General / Unhandled exception in 2.0, NOT in 1.6
« on: November 07, 2012, 05:55:32 am »
Hi, I'm quite new to SFML but decent in C++ and encountered a weird problem I thought I might share with you :)

I was following this tutorial, which is written with SFML 1.6. I've made a minimal working example to be found at the bottom.
In 1.6 it works as it should, but when converting to 2.0 I got an Unhandled exception and I have no clue why. All should be setup correctly since I've read the tutorial Getting Started multiple times to make sure I've made no mistake.

The error is at line 4 when creating a sf::Renderwindow in the global scope.
Could this be a bug or is it intentional? If it is intentional, can anyone point out why?

Working under Windows 7, in MS Visual C++ 2010 Express. Linked SFML 2.0 statically and the exact error is: Unhandled exception at 0x777122b2 in TestSFML_2.0.exe: 0xC0000005: Access violation writing location 0x00000004.

Here is the minimal working example for 1.6, thus working:
#include <SFML/Graphics.hpp>

// create window in global scope
sf::RenderWindow window;

// MAIN FUNCTION
int main(int argc, char *argv[]) {
        window.Create(sf::VideoMode(640,380), "SFML Window"); // initialize window

        // wait for close event to close
        sf::Event ev;
        while(window.IsOpened()) {
                while (window.GetEvent(ev)) {
                        if (ev.Type == sf::Event::Closed)
                                window.Close();
                }
        }
        return 0;
}

And for the error in 2.0, which throws an exception on line 4
#include <SFML/Graphics.hpp>

// create window in global scope
sf::RenderWindow window;

// MAIN FUNCTION
int main(int argc, char *argv[]) {
        window.create(sf::VideoMode(640,380), "SFML Window"); // initialize window

        // wait for close event to close
        sf::Event ev;
        while(window.isOpen()) {
                while (window.pollEvent(ev)) {
                        if (ev.type == sf::Event::Closed)
                                window.close();
                }
        }
        return 0;
}

Debug window (why are none of these files anywhere on my pc?):
Code: [Select]
'TestSFML_2.0.exe': Loaded 'C:\Users\Dieter\Documents\Visual Studio 2010\Projects\TestProject\Debug\TestSFML_2.0.exe', Symbols loaded.
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'TestSFML_2.0.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
First-chance exception at 0x777122b2 in TestSFML_2.0.exe: 0xC0000005: Access violation writing location 0x00000004.
Unhandled exception at 0x777122b2 in TestSFML_2.0.exe: 0xC0000005: Access violation writing location 0x00000004.
The program '[1300] TestSFML_2.0.exe: Native' has exited with code -1073741819 (0xc0000005).

Pages: 1 ... 7 8 [9]
anything