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

Author Topic: Failed to create texture, its internal size is too high  (Read 3205 times)

0 Members and 1 Guest are viewing this topic.

fatum

  • Newbie
  • *
  • Posts: 47
    • MSN Messenger - bowsers7@hotmail.com
    • AOL Instant Messenger - therealblah569
    • View Profile
    • http://boards.psynetfm.com
Failed to create texture, its internal size is too high
« on: February 08, 2013, 12:13:44 pm »
I decided to test my game on older hardware, and this issue was returned:

Code: [Select]
Failed to create texture, its internal size is too high
I noticed the documentation suggests using 512px wide textures for supporting older hardware.  I've started breaking up my giant textures into smaller, more manageable 512px wide textures, which is fine, but how could I make them seamlessly connect with each other?

Currently I have an std::map object that contains each "chunk" of the texture, and draws them side by side, which works just fine, except whenever I try to move them (there's a small gap in between each texture for a split second before they move).  I can fix this by offsetting each chunk by -1px, but then they don't tile properly.  Here's what my update method looks like:

Code: [Select]
for (int i = 0; i < spr_objs.size(); i++)
{
spr_objs[i].move(-(dt * 0.3f), 0);
}

Thanks for any help!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Failed to create texture, its internal size is too high
« Reply #1 on: February 08, 2013, 01:35:59 pm »
Try to use integral coordinates.

By the way, I have written the classes thor::BigSprite and thor::BigTexture to deal with the limitation of the texture size.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything