Threads - any useful in CG programming

HI guys!
I would like to find out if anyone of you is using threads in your apps?
To be honest I dont know much about them as I just started learning it in Java which looks very interesting.
If that was possible to use in C++ as in Java then I would use for my OpenGL 3D engine too which I hope would speed up things!!

OOPS!! I think someone has already asked a very similar question! sorry! its 3am!

[This message has been edited by robert_s (edited 03-12-2002).]

using multithreading it’s usefull of course, for a lot of reasons, u’ll have tasks doing something without taking care about them, u’ll take advantage of multiprocessor machines, it usefull for example to have a multithreading structure that simulates a network rendering (I use one to switch from client-server or local-local).
The only thing u must keep in mind is that managing semaphores and timings for a multithreaded app isn’t always that easy.

A good way for example whould to separate the geometry generation/managment over 2 different threads, but u must write then extra code to synchronize the different threads.


Yeah, loading geometry in another (or more) thread(s) while browsing through the scene really rocks!

(also called ‘Advanced Streaming Technology’ (don’t you like that marketing stuff? ))

Multithreading ROCKS on multiprocessor systems

You still can do neat stuff on single processor systems though (with a slight performance impact).

As for the new hype “Hyperthreading” I dont know but it sounds like “Marketing Bullsh!t” (at least to me).

The processor has a 2nd set of registers, big deal.
A context switch still trashes the caches and the pipelines and thats a much bigger penalty then saving/restoring the register file.

At least IMHO.

(its like trying to handoptimize a function that spends 90% in a OS call)