View Full Version : Threads - any useful in CG programming
03-12-2002, 04:48 PM
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!! http://www.opengl.org/discussion_boards/ubb/smile.gif
OOPS!! I think someone has already asked a very similar question! sorry! its 3am! http://www.opengl.org/discussion_boards/ubb/smile.gif
[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.
03-13-2002, 01:19 AM
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? http://www.opengl.org/discussion_boards/ubb/smile.gif ))
03-13-2002, 11:38 AM
Multithreading ROCKS on multiprocessor systems http://www.opengl.org/discussion_boards/ubb/smile.gif
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)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.