Jump to content

  • Log In with Google      Sign In   
  • Create Account

AngryPlatypus

Member Since 17 Apr 2012
Offline Last Active May 17 2013 06:48 PM

#5050707 SFML RenderTexture slow performance

Posted by AngryPlatypus on 06 April 2013 - 06:20 PM

The SFML RenderWindow is already double buffered. The method draw(...) draws to the backbuffer and display() swaps the buffers. So there is no need for a RenderTexture in this case.

 

The texture's copy constructor loads the texture from the gpu in an image and creates a new texture from that image. Both done per pixel and as cpu operation which is definitely slow.




#5030258 Advice on Creating GTA 2 like game play

Posted by AngryPlatypus on 08 February 2013 - 08:26 PM

Hi there,

 

1. i don't like a void pointer here. For me void means it can be pretty much everything. But your character shall only drive vehicles and not buildings or other characters right? Why not use a base class like "Drivable" or "Vehicle" i.e. use Polymorphism here?

 

2. body->SetActive(false) should do it.




PARTNERS