It’s exacly the same writing. The path is not the problem because when I remove the line
display.setDefault( "preloadTextures", false)
it’s work well
It’s exacly the same writing. The path is not the problem because when I remove the line
display.setDefault( "preloadTextures", false)
it’s work well
Hi @remiduchalard,
Can you please test it so that your command to create the image occurs at least one time-step after your command to “display.setDefault()”? For example, create a tiny timer:
[lua]
display.setDefault( “preloadTextures”, false )
local function onDelay()
imagemenu.engrenages=graphics.newImageSheet(“choniveau/engrenages.jpg”,{width=696,height=606,numFrames=1,sheetContentWidth=696,sheetContentHeight=606})
engrenages=display.newImage(imagemenu.engrenages,1)
end
timer.performWithDelay( 100, onDelay )
[/lua]
Pleae test and report to me if this crashes on the same devices your current code is crashing on.
Best regards,
Brent
We have the same error. I have look what is special on this device. It’s my only device with java 6
Can I try something else?
Thank you Brent Sorrentino for your help!
On simulator is load a lot of file before display them. With
display.setDefault( "preloadTextures", false)
I have the same Texture Memory used at the end of the loading (I create a lot of imagesheet), that is not normal?
Hi @remiduchalard,
Thanks for the update. Just to provide some more clarity on “preloadTextures”, here is what I received from the engineers:
Basically, setting this to “true” loads the texture as soon as you create it or pass it to a newly created display object. When set to “false”, it won’t load the texture into memory until it needs to be rendered on screen (loading is deferred). So, setting it to “false” only loads them at the exact moment when they’re needed, which may cause a visual stutter in the frame rate. This is not ideal for a game, but might be fine in a business app.
Best regards,
Brent
Thank you @Brent-Sorrentino @BrentSorrentino for your answer. I have done some test on device and simulator. And after loading (I display no image I only create image sheet) I have the same texture memory used, what that’s mean? (Is it a reserve memeory for image? Or I don’t use it correctly?)
Thank you so much for your help!
Rémi
After analyse apparently the texture memory of an imagesheet is display as use (“textureMemoryUsed”) but it’s empty until we display the image.
Can I have more information of the working of preloadTextures?