Start a new topic

Memory Limit for ImageResources creation

Memory Limit for ImageResources creation


Hi !

I am currently working on a project for which I have to load multiple Image resources from external URLs. My initial images were 1000x1000px PNG, and I could only load 7 or 8 of them. When I reduced the size to 320x320px, I am able to laod all my 20 images, but the quality is not good enough.

How can I overcome this problem ? Is there a way to allocate more memory to Wikitude so I can load more big images ?

Also it is a bit disapointing that the "onError" function of ImageResource is not triggered with a proper error message when the memory limit is reached. It took me a while to figure what was the problem.

Thanks for your support,

Amaury.

Hi Amaury,
Currently we have this OpenGL texture limit and you can not change this behaviour. You need to reduce the texture size or create not all image resources at once, but only those that are currently needed.

You should see a console log when the limit is reached.

Best regards

Andreas

Ok thanks a lot fot the answer :-) I'll try to make the console work next time, my bad. 

It would be great if future version of wikitude could integrate resources handling by default (with automatic initialization / destroy by the sdk). I can imagine that being limited to 7 Image Resources is a problem that a lot of dev may face (??).

Have a good day :-)

We will come up with a solution in our next major update. I can't tell you any details yet, but we will definetely improve it.

Best regards

Andreas
Login or Signup to post a comment