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

Author Topic: Out of Bounds World automatically NOT drawn?  (Read 1933 times)

0 Members and 1 Guest are viewing this topic.

kingcools

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Out of Bounds World automatically NOT drawn?
« on: December 26, 2013, 01:20:05 am »
hi,

short question:

When something of my 2d World (e.g. a tilemap) is drawn and parts of it are out of the windows view are they still drawn? So do i still have to check how much to draw of my world (would be strange now that i think about it)?

I remember doing a 2d worldeditor in QT and at first i drew my whole tilemap with like 200x200 dimension, even though only like 20x20 was visible at a time which made my program rather slow.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Out of Bounds World automatically NOT drawn?
« Reply #1 on: December 26, 2013, 01:26:06 am »
SFML does not provide automatic draw culling. This is something you need to implement yourself.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

kingcools

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Out of Bounds World automatically NOT drawn?
« Reply #2 on: December 26, 2013, 02:04:26 am »
Okay, thanks!

Ancurio

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Out of Bounds World automatically NOT drawn?
« Reply #3 on: December 29, 2013, 04:47:02 pm »
Note that your graphics card typically processes all vertices, and then only emits fragments for visible portions (ie. a fragment shader would not run for occluded pixels). Your main bottleneck might therefore rather be in the large amount of data (the entire tilemap's worth of vertices) that is transferred each frame.

 

anything