001 009














Open GL Super Bible:What Is OpenGL















To access the contents, click the chapter and section titles.


Open GL Super Bible


(Publisher: Macmillan Computer Publishing)

Author(s): Waite group Press

ISBN: 1571690735

Publication Date: 08/01/96



function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)==
'4')
); }
function
bookMarkit() {varurl="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();

}

 





Previous
Table of Contents
Next




Part IIntroduction To OpenGL

Part I of this book introduces you to 3D graphics and programming with OpenGL. We start with a brief discussion of OpenGL, its background, purpose, and how it works. Then, before getting into any code, weÅ‚ll talk generally about 3D graphics on computers, including how and why we “think" we see 3D, and how an objectÅ‚s position and orientation in 3D space is specified. YouÅ‚ll get the fundamental background and terminology you need to get the best out of this book.

In Chapter 3 youÅ‚ll start writing your first OpenGL programs. YouÅ‚ll learn about the various libraries and headers that are needed, and how OpenGL functions and data types are called and named. Initially weÅ‚ll cover the AUX library, a toolkit for learning OpenGL independently of any particular platform. Then weÅ‚ll “wiggle" our way into writing programs that use OpenGL under Windows 95 and Windows NT, in Chapter 4. WeÅ‚ll cover the extensions to the Windows GDI (graphical device interface) to support OpenGL under Windows and describe how they must be used.
In Chapter 5 youÅ‚ll get some essential information on OpenGLÅ‚s handling and reporting of error conditions. WeÅ‚ll tell you how you can ask the AUX library to identify itself and who makes it, and how to give performance “hints" to the library. With this knowledge in hand, youÅ‚ll be ready to tackle the meatier issues of OpenGL in Part II, where the examples will get a lot better!
Chapter 1What Is OpenGL?

OpenGL is strictly defined as “a software interface to graphics hardware." In essence, it is a 3D graphics and modeling library that is extremely portable and very fast. Using OpenGL, you can create elegant and beautiful 3D graphics with nearly the visual quality of a ray-tracer. The greatest advantage to using OpenGL is that it is orders of magnitude faster than a ray-tracer. It uses algorithms carefully developed and optimized by Silicon Graphics, Inc. (SGI), an acknowledged world leader in computer graphics and animation.

OpenGL is intended for use with computer hardware that is designed and optimized for the display and manipulation of 3D graphics. Software-only, “generic" implementations of OpenGL are also possible, and the Microsoft Windows NT and Windows 95 implementations fall into this category. Soon this may not strictly be the case, because more and more PC graphics hardware vendors are adding 3D acceleration to their products. Although this is mostly driven by the market for 3D games, it closely parallels the evolution of 2D Windows-based graphics accelerators that optimize operations such as line drawing and bitmap filling and manipulation. Just as today no one would consider using an ordinary VGA card to run Windows on a new machine, soon 3D accelerated graphics cards will become commonplace.

The Windows Graphics APIsFirst there was GDI (Graphics Device Interface), which made it possible to write hardware-independent graphicsbut at the cost of speed. Then graphics card makers began writing optimized GDI drivers to considerably speed up GDI. Then Microsoft introduced WinG to lure game developers. WinG consisted of little more than a few functions that got bitmaps to the display much faster, but it was still too slow. Microsoft next created the Direct Draw API for really low-level access to the hardware. This became rolled in with a whole set of DirectX APIs for writing directly to hardware, making games easier to write and improving their performance. Finally, 3DDI (a part of DirectX) gives high-performance 3D games a much needed shot in the arm. In Chapter 24 we talk more about the evolution and relationship of Windows and 3D graphics acceleration.

OpenGL is used for a variety of purposes, from CAD engineering and architectural applications to computer-generated dinosaurs in blockbuster movies. The introduction of an industry standard 3D API to a mass-market operating system such as Microsoft Windows has some exciting repercussions. With hardware acceleration and fast PC microprocessors becoming commonplace, 3D graphics will soon be typical components of consumer and business applications, not just of games and scientific applications.

Who remembers when spreadsheets had only 2D graphics and charting capabilities? If you think adding 3D to ordinary applications is extravagant, take a look at the bottom line of the companies that first exploited this idea. Quattro Pro, one of the first to simplify 3D charting, nearly captured the entire spreadsheet market. Today it takes far more than flat, two-dimensional pie charts to guarantee long-term success for spreadsheet applications.
This isnÅ‚t to say that everyone will be using OpenGL to do pie and bar charts for business applications. Nevertheless, appearances count for a lot. The success or failure of products with otherwise roughly equivalent features often depends on “sex appeal." And you can add a lot of sex appeal with good 3D graphics!
About OpenGL
LetÅ‚s take a look at OpenGLÅ‚s origins, whoÅ‚s “in charge" of OpenGL, and where OpenGL is going. WeÅ‚ll also examine the principles of OpenGL implementation.

A History of OpenGL
OpenGL is a relatively new industry standard that in only a few years has gained an enormous following. The forerunner of OpenGL was GL from Silicon Graphics. “IRIS GL" was the 3D programming API for that companyÅ‚s high-end IRIS graphics workstations. These computers were more than just general-purpose computers; they had specialized hardware optimized for the display of sophisticated graphics. This hardware provided ultrafast matrix transformations (a prerequisite for 3D graphics), hardware support for depth buffering, and other features. When SGI tried porting IRIS GL to other hardware platforms, however, problems occurred.

OpenGL is the result of SGIÅ‚s efforts to improve IRIS GLÅ‚s portability. The new language would offer the power of GL but would be “Open," allowing for easier adaptability to other hardware platforms and operating systems. (SGI still maintains IRIS GL, but no enhancements or features other than bug fixes are being made.)
On July 1, 1992, Version 1.0 of the OpenGL specification was introduced. Just five days later, at the very first Win32 developers conference, SGI demonstrated OpenGL running on their IRIS Indigo hardware. Video clips from films such as Terminator Two: Judgment Day, and medical imaging applications were popular attractions in the vendor exhibit hall. Already, SGI and Microsoft were working together to bring OpenGL to a future version of Windows NT.



Previous
Table of Contents
Next














 


Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.












Wyszukiwarka

Podobne podstrony:
can RENAULT CLIO III GRANDTOUR 08 XX PL 001
001 PMP cw1
v 06 001
Zestawy 001
03 0000 001 02 Leczenie raka piersi docetakselem
MT001
001 kom
007 009
009 2id$68

więcej podobnych podstron