Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
{wrap = Texture.REPEAT} — Gideros Forum

{wrap = Texture.REPEAT}

duke2017duke2017 Member
edited September 2012 in Bugs and issues
Hello, I faced the same .. bug .. (maybe it's not a bug but a feature)

wall = Shape.new()
local texture = Texture.new("brick.png", true, {wrap = Texture.REPEAT})
wall:setFillStyle(Shape.TEXTURE, texture)
wall:beginPath()
wall:moveTo(-150,-150)
wall:lineTo(150, -150)
wall:lineTo(150, 150)
wall:lineTo(-150, 150)
wall:closePath()
wall:endPath()
wall:setPosition(160,160)
stage:addChild(wall)

I would like to sprite poured wall completely, with no gaps. what I am doing wrong? thanks..
brick.png is 20x40
results included

Likes: mehmetuysal

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • techdojotechdojo Guru
    Accepted Answer
    It's an OpenGL thing - your texture dimensions need to be a power of 2 for this to work (eg. 2,4,8,16,32,64,128,256 etc)
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
    +1 -1 (+3 / -0 )Share on Facebook
Sign In or Register to comment.