Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesThree Ways to Tackle Multithreading


June 1996 / Features / Must-See 3-D Engines / Three Ways to Tackle Multithreading

Three-dimensional rendering often consists of many small tasks that need to be done almost in parallel. To boost performance, all three of the APIs we talk about in this article consist of reentrant code, which makes them well suited to work in multithreaded OSes. However, there are subtle differences in how they handle threads.

OpenGL can handle several program threads, where each thread manages a separate window. Alternately, several threads can divide and conquer an imaging job within a single window. It's important to note that reentrant code by itself doesn't guarantee concurrent graphics processing. The OpenGL commands that control the gra phics state make concurrent pr ocessing possible by saving and restoring the graphics environment for each window as the execution context switches among threads.

Release 1.1 of QuickDraw 3D (QD3D) supports interactive rendering using multiple processors or a multithreaded application. Because QD3D's View class object retains the graphics context, context switches between different graphics states for different threads or different processors are handled automatically. Unlike OpenGL, QD3D has no support for distributed processing over a network, but QD3D's architecture permits third-party plug-ins to do this.

Direct3D supports a multithreaded environment where different applications can draw to different windows simultaneously. It is not optimized for multiprocessing, because Windows 95 is optimized for single-processor systems. Like QD3D, retained-mode objects encapsulate graphics state information. This allows the graphics state of the rendering pipeline's modules to be updated automatically when a context switch occurs between threads that manage different scenes. Applications using the immediate mode must save and restore the graphics state of the pipeline themselves on a context switch.


Up to the Features section contentsGo to previous article: Three Ways to Tackle MultithreadingSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network