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
Likes: SinisterSoft
Is Atilim gone yet, if not maybe he can do a dev preview 2.0 beta 2 (with all the latest features included along with opengl 2) before he goes.
https://deluxepixel.com
What ever he is up to now, he better give his best on the trip and concentrate mostly on it
https://deluxepixel.com