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, 04:09 AM   #3 (permalink)
bluelobster
Registered Member
 
Join Date: Mar 2010
Posts: 20
Default

Good question.

Maybe I don't understand how threads work but here is what I understand needs to happen...

For the progress bar:

Code:
// level load
- (void) loadLevel
{
  // do some stuff
  
  // update percentDone

  // do more stuff

  // update percentDone
}

// render
- (void) render
{
  // figure out the bar length
  barLength = barLength * percentDone;
  // render the bar
  renderBar();
}
So the problem here is the core of the progress bar update is done in the render loop...I don't know that a thread that is created would be able to access the render loop since it is setup and called from the grand daddy game loop. Know what I mean?

Is it possible to render stuff in a separate thread? I don't know how to do that...

What's nice about what i'm doing now...well not that nice because it doesn't work...but I can let my main game loop go rendering the frames as it does and when I spawn off the thread to do the loading work it doesn't have to worry about being involved with the renderer...
bluelobster is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,862
Threads: 89,223
Posts: 380,685
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:40 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.