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

Author Topic: Textures and the power of two  (Read 1313 times)

0 Members and 1 Guest are viewing this topic.

Qluxzz

  • Guest
Textures and the power of two
« on: February 18, 2014, 07:05:15 pm »
I'm working on backgrounds and foregrounds for a game and I would want these to be 1920x1080 which is not the power of two. I have tried 2560x1024 and then slicing it into 512x512 parts to support older graphics cards.

This works fine and all but I would to keep them in 16:9 aspect ratio. What would be the best way to approach this problem, and how important is the power of two?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Textures and the power of two
« Reply #1 on: February 18, 2014, 07:15:16 pm »
If you are using C++: thor::BigTexture and thor::BigSprite
If you are using C#: NetEXT.Graphics.LargeTexture and NetEXT.Graphics.LargeSprite

Thor
NetEXT
« Last Edit: February 18, 2014, 07:41:59 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Textures and the power of two
« Reply #2 on: February 18, 2014, 10:04:39 pm »
Both Thor and NetEXT will automatically split the texture you provide into smaller textures that will match the maximum size that the graphics card supports. If the current texture size is smaller than the maximum hardware size then no splitting will happen.  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor