10.02.2014 Views

spec - OpenGL

spec - OpenGL

spec - OpenGL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

¡ ¡ ¡<br />

¡ ¡ ¡<br />

3.8. BITMAPS 283<br />

! ! ! <br />

! ! ! <br />

! ! !<br />

" " " # # #<br />

<br />

<br />

" " " # # #<br />

<br />

<br />

" " " # # # $ $ $ % % %<br />

<br />

$ $ % % % $<br />

<br />

$ $ % % % & & & ' ' ' $<br />

<br />

& & ' ' ' &<br />

<br />

& & ' ' ' &<br />

<br />

<br />

h = 12<br />

<br />

<br />

<br />

<br />

<br />

¨ ¨ © © © <br />

<br />

¨<br />

¨ ¨ © © © <br />

¨<br />

¦ ¦ § § § ¨ ¨ ¨ © © © <br />

¦<br />

¦ ¦ § § § ¦<br />

¤ ¤ ¥ ¥ ¥ ¦ ¦ ¦ § § § ¤<br />

¤ ¤ ¥ ¥ ¥ ¤<br />

¤ ¤ ¥ ¥ ¥ ¤<br />

y bo = 1.0<br />

¢ ¢ £ £ £ ¢<br />

¢ ¢ £ £ £ ¢<br />

¡ ¡ ¢ ¢ ¢ £ £ £ ¡<br />

x bo = 2.5<br />

w = 8<br />

Figure 3.9. A bitmap and its associated parameters. x bi and y bi are not shown.<br />

or arithmetic would have been performed) form a stipple pattern of zeros and ones.<br />

See figure 3.9.<br />

A bitmap sent using Bitmap is rasterized as follows. First, if the current raster<br />

position is invalid (the valid bit is reset), the bitmap is ignored. Otherwise, a rectangular<br />

array of fragments is constructed, with lower left corner at<br />

(x ll , y ll ) = (⌊x rp − x bo ⌋, ⌊y rp − y bo ⌋)<br />

and upper right corner at (x ll +w, y ll +h) where w and h are the width and height of<br />

the bitmap, re<strong>spec</strong>tively. Fragments in the array are produced if the corresponding<br />

bit in the bitmap is 1 and not produced otherwise. The associated data for each<br />

fragment are those associated with the current raster position. Once the fragments<br />

have been produced, the current raster position is updated:<br />

(x rp , y rp ) ← (x rp + x bi , y rp + y bi ).<br />

The z and w values of the current raster position remain unchanged.<br />

Calling Bitmap will result in an INVALID_FRAMEBUFFER_OPERATION error<br />

if the object bound to DRAW_FRAMEBUFFER_BINDING is not framebuffer complete<br />

(see section 4.4.4).<br />

<strong>OpenGL</strong> 4.2 (Compatibility Profile) - August 22, 2011

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!