Author Topic: Another raytracer.  (Read 15163 times)

0 Members and 1 Guest are viewing this topic.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Another raytracer.
« Reply #40 on: August 15, 2007 »
@Stonemonkey: I've tried your exe and it run very slow here, it took around 7 seconds to render one frame :( , probably because I've only one processor core ???  (Pentium 4 2.8Ghz)


Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Another raytracer.
« Reply #41 on: August 15, 2007 »
->rbraz - don't worry, it only does about 2fps on my Core2 Duo 2.66GHz!

->fryer - you almost certainly don't have to worry about data locking in this program - multiple threads can share the model data with no problems, and since they're each writing to different bits of the screen it's OK too.

You need the locking when one thread writes some data and another thread needs to read it back.  Usually you create a 'semaphore' (not a mutex, which is slightly different).  One thread then 'locks' the semaphore, does the writes and unlocks it again.  If the other thread tries to lock the semaphore while the first thread still has it locked, it will block until the semaphore is released.  Clever eh? :)

Jim
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Another raytracer.
« Reply #42 on: August 15, 2007 »
Thanks Jim.

rbraz, that does seem a bit slow to me. I have a single core amd64 @ 2.1GHz and get somewhere around 1fps

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: Another raytracer.
« Reply #43 on: August 15, 2007 »
i've got a amd athlon xp 2600+ 1.9 ghz and running a little more than 1 fps
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Another raytracer.
« Reply #44 on: August 19, 2007 »
Thanks Jim.

rbraz, that does seem a bit slow to me. I have a single core amd64 @ 2.1GHz and get somewhere around 1fps
Might be my graphics board then, I've always got bad FPS with software rendered pixel.
Challenge Trophies Won: