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

Pages: 1 [2] 3
16
System / [SFML 2.0 RC] - Threads
« on: June 03, 2012, 06:38:45 pm »
I just wanted to get an old (and never finished) project to work with SFML 2.0. I found out that there were lots of changes to the sf::Thread class, and I'm a bit confused why the 'old' way of creating threads (by inherting from sf:Thread and overriding 'Run()') was removed - I found this approach simple and elegant.
What's the reason for this change? Are there plans to reimplement the 'old' approach as an alternative?

17
General / libgcc_s_dw2-1.dll missing error
« on: July 16, 2010, 03:46:25 pm »
Quote from: "Laurent"
This is not the same version. SFML uses the Dwarf2 version of gcc, not the SJLJ one (these acronyms refer to how the exception system is implemented).

It really sucks that gcc 4 has two different implementations on Windows...


Thanks for the quick reply. Do you have an idea why the -static-libgcc doesn't have any effect?

18
General / libgcc_s_dw2-1.dll missing error
« on: July 16, 2010, 02:17:34 pm »
I have a very similar problem, I'm just trying out the latest release of Code::Blocks, which also supports an SFML project template.

This template doesn't seem to work out of the box, but I managed to make it compile after some modifications. However, when I try to run the program, I also get an error that libgcc_s_dw2-1.dll is missing.
The file doesn't seem to exits in mingw's bin directory, there's only a libgcc_s_sjlj-1.dll in that dir. Adding the -static-libgcc linker option doesn't seem to help either.
I use the version of MinGW that was included with Code::Blocks, which seems to be 4.4.1

19
General / Performance within VirtualBox
« on: December 24, 2009, 12:02:58 am »
Yeah, it works :D

Took me quite a while to figure out the reason for all those "undefined references", but it was a very small error in the end: I had forgotten to add libsfml-window to the list of libraries to which I link. Seems that it wasn't necessary with SFML 1.4, perhaps some functions were moved from graphics to window?!

Afterwards, I had to find out how to add another search path for dynamic libraries - LD_LIBRARY_PATH didn't work. ld's "-rpath" option is the answer ;)

The performance with SFML2 seems indeed to be much better than with SFML 1.4 - though I can't make a direct comparison at the moment, as I uninstalled SFML 1.4 during my bug-search ;)

Thanks again for all the help, and Merry Christmas :)

20
General / Performance within VirtualBox
« on: December 20, 2009, 10:15:59 pm »
I was able to build SFML 2, but now my project doesn't build anymore, I get tons of undefine reference errors.

I guess part of my problem is that I didn't want to install SFML 2 globally, but instead placed it in my home directory, and still have SFML 1.4 installed system-wide. As I've no idea how to specify header search dirs with scons, I guess I'm currently using the 1.4 includes, but trying to link against 2.0.

I'll see if I can fix this...

21
General / Performance within VirtualBox
« on: December 20, 2009, 09:55:34 pm »
Quote from: "Laurent"
You must use a SVN client, then checkout branches/sfml2. I think there's a tutorial on the wiki.


Thanks for the quick reply. I just checked it out, now I'll see if it builds.

Didn't find a tutorial related to SFML 2, though.

22
General / Performance within VirtualBox
« on: December 20, 2009, 09:28:04 pm »
How/when/where can I get SFML2? I just downloaded and built the trunk tarball, but that seems to be 1.6.

23
General / Performance within VirtualBox
« on: December 10, 2009, 10:58:33 pm »
I'm running Linux Mint 8 in the 32 bit version inside the VM, but Linux Mint is afaik more or less the same as Ubuntu, so that shouldn't make a difference.

Edit: Ooops, didn't want to create a new post for that, I accidentally pressed "quote" instead of "edit".

24
General / Performance within VirtualBox
« on: December 10, 2009, 10:56:26 pm »
I didn't really check it, I just saw that the desktop-effects I enabled (wobbly windows and a transparent terminal) ran pretty smooth, so I assumed that it must be HW-accelerated.

I'm not sure how to find out if HW-acceleration is actually active. What should glxinfo print out if it is?

glxgears claims to render around 12800 frames in 5 seconds.

25
General / Performance within VirtualBox
« on: December 09, 2009, 10:58:39 pm »
I just had a look at the activity inside the VM when my app is running: It's not the app itself that causes high CPU loads, but Xorg.

26
General / Performance within VirtualBox
« on: December 09, 2009, 10:33:40 pm »
The code for drawing the stars looks like this:
Code: [Select]

void Starfield::draw()
{
    for ( int i = 0; i < this->nStars; ++i )
    {        
        int screenX = this->starList[i].x / this->starList[i].z + this->centerX;
        int screenY = this->starList[i].y / this->starList[i].z + this->centerY;
        sf::Shape rect = sf::Shape::Rectangle( screenX, screenY, screenX + 3, screenY + 3,
                                               sf::Color(255 - starList[i].z * 2,
                                                         255 - starList[i].z * 2,
                                                         255 - starList[i].z * 2,
                                                         255) );
        this->window->Draw( rect );

        this->starList[i].z -= this->speedList[i] * this->window->GetFrameTime();

        if ( this->starList[i].z < 1 )
            this->starList[i].z = rand() % 50 + 1;
    }
}


This method is called in every iteration of the main loop. If I comment out the this->window->Draw( rect ); line, the app is running at relatively normal speed.

Perhaps its just too many OpenGL calls which lead to world switches between the guest and the host?!

27
General / Performance within VirtualBox
« on: December 08, 2009, 10:33:36 pm »
I tried to run a simple SFML-app I've written inside a Linux virtual machine, hosted by VirtualBox on a Win 7 x64 host.

VirtualBox supports OpenGL for guest operating systems since quite a while now, and the performance is surprisingly good when using some Compiz desktop effects inside the VM (like wobbly windows or transparency). My SFML-app however (which does not much more than drawing a few sprites) runs really, really slow and stuttering, and I'm not quite sure whether this is a problem of VirtualBox, my app, or SFML.

Has anyone else here ever tried to use SFML inside a virual machine?

EDIT: Just found out that the problem seems to be created by drawing a pseudo-3D-starfield in the background which consisted of 500 stars. Perhaps there's something wrong with the way I update the position of these stars. I'll see if I can figure it out.

EDIT2: Ok, it seems to be related to some graphic/OpenGL-stuff. If I calculate the position for each star but don't draw it (by commenting out the call to the draw-method of the render-window), it runs at quite normal speed.

28
General discussions / SFML / Performance in VirtualBox
« on: May 09, 2009, 03:54:23 pm »
Quote from: "Tank"
VirtualBox supports OpenGL? Uh, have to check that out. :)


Yeah, since version 2.0 or so, I guess. It was only for Windows-guests in the first release (if I remember correctly), but now (since 2.2?!) it should also work with Linux guests.

I'm not sure if it's still beta.

29
General discussions / SFML / Performance in VirtualBox
« on: May 05, 2009, 09:08:06 pm »
Sorry for pushing that one up again, but I thought it would be worth discussing the VirtualBox-question again, as VirtualBox now supports hardware-accelerated OpenGL for guest operating systems.

However, I tried it out and found that my simple SFML-application runs extremly slow. Has anyone else tried SFML in VirtualBox with OpenGL-support enabled?

30
General / SFML is bucking
« on: February 21, 2009, 01:49:58 pm »
The phenomenon you describe reminds me of a strange bug I once experienced when running Quake3: The game ran smooth, but every few seconds, it just "froze" for a short period of time.
The reason for this  was that I had unplugged my GamePad, but Windows thought for some reason that it was still there. So I guess Windows tried to "poll" the GamePad in regular time intervals, which caused the stuttering. After I removed the GamePad in the Control Panel, the problem was gone.

However, as you wrote in the German forum that you also tried examples that do not use any SFML-input stuff, this explanation might be unlikely. But as you don't have problems with the NeHe-examples (which are graphics only), I think this problem might be caused by some SFML-code that is not graphic-related.

Have you tried to strip down an example where the problem occurs? If you have some sample code, try to remove all Event-Handling and Input-Related code and try again.
You could, for example, remove the event-processing in Wolfram's sample code (you won't be able to close the application if you do that, but as it's only thought for testing, that might be ok ;) ).

Pages: 1 [2] 3
anything