views:

120

answers:

0

My Game (made using OpenGLES 2D) is Completely Working and Now we are trying to add Loading screen in between Levels while deallocating all resources and allocate new resources the loading screen should appear

So for this we ve decided to us NSThread

//setting flag for thread [NSThread detachNewThreadSelector:@selector(LoadingScreen:) toTarget:self withObject:nil]; //Perform Deallocate Operation //perform Allocation of new resource //reset flag for thread so that Loading thread can Exit

//Continue Game Logic

Now the Problem is Thread is created and Executed Properly but doesnot Allow OpenGL Functions and any Statement to Execute so we cannot show loading screen

and it gives Bad Access Error

We try Vice Versa

that is thread for Deallocation and loading Screen will be in current thread but dealloc method uses openGl methods (for deallocating Images and textures)

so it cant work in both way

Some one posted in another Forum that we Have to create another Layer(i dont know how or it can be)

Please Provide Sample code and help me with the concept

or if there is another way to do this Please Let me know

Thanks in Advance

Regards Manohar