Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Not clearing the contents of a RenderWindow after Display  (Read 21035 times)

0 Members and 2 Guests are viewing this topic.

workmad3

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Not clearing the contents of a RenderWindow after Display
« Reply #15 on: May 18, 2008, 12:03:18 am »
The code required to check which pixels have changed is more inefficient than brute force pixel pushing with todays hardware, yes. Especially when doing such an 'optimisation' will frequently require you to do things like get the rendered image from the hardware which is hugely inefficient in todays rendering pipelines as copying data to and from the graphics hardware is frequently a bottleneck. If a software renderer is introduced into the SFML library, then I'd expect issues like this to start appearing (or for laurent to implement it in such a way that redrawing things that haven't changed become a no-op if possible :))

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Not clearing the contents of a RenderWindow after Display
« Reply #16 on: May 18, 2008, 06:12:41 am »
The Display() function means "display what you have rendered since last call". So if you don't draw anything between two calls of Display(), the second call won't show anything.

I agree with workmad3, there's really no point doing that. If you come back one day in big trouble because of this particular thing, ok, but right now there's no point trying to do such things.

SFML is designed for fast real-time graphics, which means we shouldn't have to care about optimizing static stuff.
Laurent Gomila - SFML developer

Kernelpanic

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://eisenholz.bplaced.net
Not clearing the contents of a RenderWindow after Display
« Reply #17 on: May 18, 2008, 12:56:37 pm »
Okay, for the moment I manage the redrawing with a few pointers.
Thank you! Nice Forum!