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

Author Topic: SFML texture artifacts.  (Read 1320 times)

0 Members and 1 Guest are viewing this topic.

gradosh

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML texture artifacts.
« on: July 29, 2013, 03:32:26 pm »
First of all, sorry for my english :(
I'm  experiencing some problems with textures(
https://docs.google.com/file/d/0BzHAo__Dwn0xOU1jZGdRNWV5d28/edit?usp=sharing
https://docs.google.com/file/d/0BzHAo__Dwn0xTTZSd2t2NVcwUnc/edit?usp=sharing
), but only on built-in video adapter(intel hd 4000) and only if i have more than a 30(or so) bars. On pc with gt 240 there are no problems at all( https://docs.google.com/file/d/0BzHAo__Dwn0xUU1Fb1pHdXhGdU0/edit?usp=sharing ).
Approximate number of textures is 19 + 7*barsCount;
Is there a texture limit for certain video adapters ?
Source code: https://github.com/gradosh/sfmltest
Should i lower the number of textures to avoid this kind of artifacts?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML texture artifacts.
« Reply #1 on: July 29, 2013, 04:12:28 pm »
You should not be using that many textures. Just use 1 texture for the bars and then draw it for how many bars you have. Remember swapping textures on the GPU is an expensive process and you should do it only when you need to draw a different texture.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

gradosh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML texture artifacts.
« Reply #2 on: July 29, 2013, 04:31:57 pm »
Ok. thank you for reply. I'll try to use as less textures as possible, but there is still a question remaining.
Why these texture artifacts depend of video card ?
« Last Edit: July 29, 2013, 04:49:22 pm by gradosh »

 

anything