These meetings are open to the public, and nonmember companies may participate in
discussions (although they can’t vote). Permission to attend must be requested in advance,
and meetings are kept small to improve productivity. Members of the ARB frequently
participate in the Internet newsgroup comp.graphics.api.opengl. Questions and
recommendations can also be aired there.
In December 1995 the ARB ratified the final specification for Version 1.1 of OpenGL.
Many of the additions and changes from Version 1.0 were for performance reasons and are
summarized in Appendix A.
How OpenGL Works
OpenGL is a procedural rather than a descriptive graphics language. Instead of describing
the scene and how it should appear, the programmer actually describes the steps necessary to
achieve a certain appearance or effect. These “steps” involve calls to a highly portable API
that includes approximately 120 commands and functions. These are used to draw graphics
primitives such as points, lines, and polygons in three dimensions. In addition, OpenGL
supports lighting and shading, texture mapping, animation, and other special effects.
OpenGL does not include any functions for window management, user interaction, or file
I/O. Each host environment (such as Microsoft Windows) has its own functions for this
purpose and is responsible for implementing some means of handing over to OpenGL the
drawing control of a window or bitmap.
OpenGL under Windows
OpenGL made its debut in the release of Windows NT 3.5. A set of DLLs was also made
available to add support for OpenGL to Windows 95 shortly after its release. This book, in
fact, is specifically about Microsoft’s generic implementation of OpenGL. We will guide
you, the developer, through the fundamentals of 3D graphics first, and then show you how
to compile and link some OpenGL programs under Windows NT or Windows 95. Moving
on, we’ll cover the “wiggle” functions provided by Microsoft— the glue that enables the
OpenGL graphics API to work with Microsoft’s GDI. From there we will cover the entire
OpenGL API, using the context of Microsoft Windows NT and/or Windows95.
Graphics Architecture: Software versus Hardware
Using OpenGL is not at all like using GDI for drawing in windows. In fact, the current
selection of pens, brushes, fonts, and other GDI objects will have no effect on OpenGL. Just
as GDI uses the device context to control drawing in a window, OpenGL uses a rendering
context. A rendering context is associated with a device context, which in turn is associated
with a window, and voilà— OpenGL is rendering in a window. Chapter 4 discusses all the
mechanics associated with this process.
Niciun comentariu:
Trimiteți un comentariu