Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Render to Texture — Gideros Forum

Render to Texture

SinisterSoftSinisterSoft Maintainer
edited March 2014 in Bugs and issues
Render to texture sometimes fails on some devices (cheaper Samsungs) if multiple large textures are allocated.

It doesn't return nil - it crashes the app and returns to the android desktop.

tMap={}
for x=1,2 do
tMap[x]={}
for y=1,4 do
tMap[x][y]={}
tMap[x][y].offsetX=(x-1)*1000
tMap[x][y].offsetY=(y-1)*1020
tMap[x][y].texture=RenderTarget.new(1000,1020,true) <--- this crashes completely about 5 in on some phones
if tMap[x][y].texture then
tMap[x][y].bitmap=Bitmap.new(tMap[x][y].texture)
tMap[x][y].bitmap:setScale(mapScale)
tMap[x][y].bitmap:setPosition((x-1)*tMap[x][y].bitmap:getWidth()-1,(y-1)*tMap[x][y].bitmap:getHeight())
mapLayer:addChild(tMap[x][y].bitmap)
end
end
end
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com

Comments

Sign In or Register to comment.