02-05-2012 12:32 AM - edited 02-05-2012 12:44 AM
Is it possible to call StartItemRequest() from a spawned thread so that the UI can continue to be updated by the main thread whilst the list panel items are drawn? Each list panel item I am creating currently takes >500ms to render and I want to have a busy indicator showing whilst this is happening - but I am getting an exception Sce.Pss.Core.Graphics cannot be accessed by multiple theads
I've put mutex's around what I can see to be my UI update calls but am getting this exception on the constructor of my ListPanelItem
I'd appreciate any guidance some of you might able to give!
on 07-05-2012 07:21 PM
26-06-2012 01:41 PM - edited 26-06-2012 01:48 PM
I have the same ptoblem. "Sce.Pss.Core.Graphics cannot be accessed by multiple theads". And I can describe the steps or give you some code when it happens to me.
Assume that we have multiple game states. On of them is for loading and of them is drawing the actual gameplay. When I switch state to loading I start a background thread to load textures and other assets for the level while drawing some image in the main thread and I get this exception. I'm using v0.98 of SDK and PS Suite Simulator for testing curently. It seems that GraphicsContext is used to create a Texture2D object. Calling doing all GraphicsContext call on the same thread is not an option here as far as I understand this.
1) starting game (splashes, menu, etc) one thread
2) beginning the actual game main thread to do drawing of "Loading Screen" and waiting until background thread finishes its job and the actual background thread to do loading. When I start the background thread I get exception mentioned earlier.
Will appreciate any help on this.
Website ©2013 Sony Computer Entertainment Europe