OpenGL Programming for the X Window System by Mark J. Kilgard

By Mark J. Kilgard

Created through Silicon pictures, Inc., OpenGL has turn into the general for the 3D pictures programming neighborhood. From SGI's X home windows images specialist, who built the software toolkit which serves because the cornerstone of OpenGL, this booklet explains how the OpenGL libraries are carried out less than X home windows permitting programmers to use the convenience and performance of OpenGL.

Show description

Read or Download OpenGL Programming for the X Window System PDF

Best windows desktop books

Adobe Encore DVD 1.5 for Windows

Delivering sufficient templates, shapes, and improvements that you should create menus with no turning to Photoshop, the enhanced Library and types palettes in Encore DVD 1. five characterize only one of many purposes DVD creators like your self are flocking to Adobe's lately up-to-date authoring software program. This no-nonsense consultant deals the main sensible means of having informed in it!

Professional Windows Live programming

*Windows reside is the collective identify for a gaggle of Microsoft instruments whose prone and person info can be found anywhere-without ever having to put in an program *Windows stay at present includes: home windows stay Mail, home windows reside protection heart, home windows reside Favorites, home windows dwell OneCare, home windows reside Messenger, home windows reside seek, and home windows stay neighborhood *Certified Microsoft software program Developer Jon Arking stocks his adventure in constructing for home windows dwell, and teaches readers the way to construct purposes that include the home windows dwell platform *Packed with examples, this hands-on advisor deals an insightful examine the instruments and applied sciences in the back of home windows dwell, utilizing the MSN actions APIs, construction mapping functions with digital Earth APIs, and constructing contraptions for either on-line and home windows Vista *Also examines integrating MSN seek functions in addition to reside companies into current websites with stay customized domain names

System BIOS for IBM PCs, compatibles, and EISA computers : the complete guide to ROM-based system software

The second one version of this bestselling advisor covers the subsequent new release Phoenix BIOS, utilized in significant laptop appropriate, EISA, and 486-based pcs. an individual constructing software program for those machines wishes this crucial details

The Craft of Windows 95™ Interface Design: Click Here to Begin

Strong software program interface layout is as the most important to a product's luck as is its performance. With the supply of visible improvement instruments akin to visible uncomplicated and visible C++, progressively more builders of functions might want to comprehend and use ideas of excellent interface layout. This e-book may also help advisor the reader to a greater figuring out of ways to make home windows software program basic to navigate and a excitement to exploit.

Extra resources for OpenGL Programming for the X Window System

Sample text

With glDrawElements(), the vertices for each face of the cube can be placed in an array of indices. Example 2-11 shows two ways to use glDrawElements() to render the cube. Figure 2-15 shows the numbering of the vertices used in Example 2-11. edu/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/@Generic__BookTextView/1963;hf=0;cs=fullhtml;lang=pt (31 of 44) [20-03-2000 23:26:01] OpenGL Programming Guide (Addison-Wesley Publishing Company) static GLubyte topIndices = {2, 3, 7, 6}; glDrawElements(GL_QUADS, glDrawElements(GL_QUADS, glDrawElements(GL_QUADS, glDrawElements(GL_QUADS, glDrawElements(GL_QUADS, glDrawElements(GL_QUADS, 4, 4, 4, 4, 4, 4, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, frontIndices); rightIndices); bottomIndices); backIndices); leftIndices); topIndices); Or better still, crunch all the indices together: static GLubyte allIndices = {4, 5, 6, 7, 1, 2, 6, 5, 0, 1, 5, 4, 0, 3, 2, 1, 0, 4, 7, 3, 2, 3, 7, 6}; glDrawElements(GL_QUADS, 24, GL_UNSIGNED_BYTE, allIndices); Note: It is an error to encapsulate glDrawElements() between a glBegin()/glEnd() pair.

Nonplanar polygons can be viewed from some orientation such that the edges cross each other, and OpenGL might not render such polygons correctly. ● There's always a trade-off between the display speed and the quality of the image. If you subdivide a surface into a small number of polygons, it renders quickly but might have a jagged appearance; if you subdivide it into millions of tiny polygons, it probably looks good but might take a long time to render. Ideally, you can provide a parameter to the subdivision routines that indicates how fine a subdivision you want, and if the object is farther from the eye, you can use a coarser subdivision.

For the vertex coordinate array, the corresponding command would be glVertex[size][type]v(), where size is one of [2,3,4], and type is one of [s,i,f,d] for GLshort, GLint, GLfloat, and GLdouble respectively. Both size and type were defined by glVertexPointer(). For other enabled arrays, glArrayElement() calls glEdgeFlagv(), glTexCoord[size][type]v(), glColor[size][type]v(), glIndex[type]v(), and glNormal[type]v(). If the vertex coordinate array is enabled, the glVertex*v() routine is executed last, after the execution (if enabled) of up to five corresponding array values.

Download PDF sample

Rated 4.00 of 5 – based on 47 votes