Repeatable Texture on Sprite with custum TextureRegion Size

  ... discussions about development with the GLES1 branch of AndEngine.

Repeatable Texture on Sprite with custum TextureRegion Size

Postby uncleistvan » Sun Apr 29, 2012 5:36 pm

Hi,

I am trying to assign a Textureregion with width 240 to a sprite with width 480. The default result would be a stretched texture.

In order to get it to repeat I tried out all TextureOptions and other advices from the forum. Putting a repeating texture on a sprite does only seem to work properly if the textureregion's width/height are powers of 2.

Does this mean there is no solution for my problem (apart from creating a 2nd sprite)?
uncleistvan
 
Posts: 3
Joined: Tue Apr 10, 2012 12:14 am

Re: Repeatable Texture on Sprite with custum TextureRegion S

Postby jaym » Mon Apr 30, 2012 12:15 am

As far as I know, OpenGL ES both 1.0 and 2.0 do not allow for non-power of two repeating textures. You can try to search around somewhere for a hack but otherwise your best bet will be to scale your texture up to the next power of two value.
AndEngine for Android Game Development Cookbook - Based on AndEngine's latest, greatest, GLES2.0 AnchorCenter branch!
jaym
 
Posts: 690
Joined: Wed May 04, 2011 10:08 pm


Return to GLES1

Who is online

Users browsing this forum: alraza1 and 15 guests