Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-12-2010, 03:52 AM   #1 (permalink)
bluelobster
Registered Member
 
Join Date: Mar 2010
Posts: 20
Unhappy Loading textures in the background?

So I am trying to do something that is not new or revolutionary...display a progress bar during the loading of my levels.

To do this I spawn a new thread to do all the loading, while the main thread draws the progress bar...seems like it should work huh?

Nope!

When I go to render my world I get nothing but white...

If I do everything in the main thread (which of course doesn't allow the progress bar to work) everything renders fine.

So my question is wtf?!

I've been looking at this for the last two days and am really at my wit's end.

I was thinking that maybe because I am loading my textures in a different thread only that thread would know about them...so I created a singleton object to hold all my textures...so shouldn't matter what thread is populating it...since it's a singleton...it should be available to everyone? I mean the next thread (the main thread) that grabs it should get the correct data...right?

During debugging I can inspect all my texture objects and sure enough everything is there...name, image name, texture coords, verts, etc... But sadly only white is displayed =(

Anyone know what's going on here?

Thank you for your time.
bluelobster is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,862
Threads: 89,223
Posts: 380,683
Top Poster: BrianSlick (7,129)
Welcome to our newest member, higgey
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:31 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.