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, 06:34 AM   #4 (permalink)
georgeburns
Registered Member
 
Join Date: Feb 2010
Posts: 267
Default

Quote:
Originally Posted by bluelobster View Post
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...
I'm not seeing any code for the threading.
georgeburns is offline   Reply With Quote
 

» Advertisements
» Online Users: 838
24 members and 814 guests
ADY, AndreaT, AragornSG, Creativ, Desert Diva, Donovan472, dreamer11, elhanche, hermi7jami, higgey, ilmman, iphone.savvy, iph_s, jimbo, meandroz, moriko, sialcasa, supasounds, TamsiE, Tanya Mir, TTStu, VikMyr, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,863
Threads: 89,223
Posts: 380,687
Top Poster: BrianSlick (7,129)
Welcome to our newest member, hermi7jami
Powered by vBadvanced CMPS v3.1.0

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