095 098














Open GL Super Bible:OpenGL for Windows: OpenGL + Win32 = Wiggle















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




cColorBits specifies the number of color bitplanes used by the color buffer, excluding the alpha bitplanes in RGBA color mode. In color index mode, it specifies the size of the color buffer.
cRedBits specifies the number of red bitplanes in each RGBA color buffer.
cRedShift specifies the shift count for red bitplanes in each RGBA color buffer. *
cGreenBits specifies the number of green bitplanes in each RGBA colorbuffer.
cGreenShift specifies the shift count for green bitplanes in each RGBA color buffer. *
cBlueBits specifies the number of blue bitplanes in each RGBA color buffer.
cBlueShift specifies the shift count for blue bitplanes in each RGBA color buffer. *
cAlphaBits specifies the number of alpha bitplanes in each RGBA color buffer. This is not supported by the Microsoft implementation.
cAlphaShift specifies the shift count for alpha bitplanes in each RGBA color buffer. This is not supported by the Microsoft implementation.
cAccumBits is the total number of bitplanes in the accumulation buffer. See Chapter 15.
cAccumRedBits is the total number of red bitplanes in the accumulation buffer.
cAccumGreenBits is the total number of green bitplanes in the accumulation buffer.
cAccumBlueBits is the total number of blue bitplanes in the accumulation buffer.
cAccumAlphaBits is the total number of alpha bitplanes in the accumulation buffer.
cDepthBits specifies the depth of the depth buffer. See Chapter 15.
cStencilBits specifies the depth of the stencil buffer. See Chapter 15.
cAuxBuffers specifies the number of auxiliary buffers. This is not supported by the Microsoft implementation.
iLayerType specifies the type of layer. Table 4-4 lists the values defined for this member, but only the PFD_MAIN_PLANE value is supported by the Microsoft implementation.
Table 4-4 Flag values for iLayerType



Flag
Description



PFD_MAIN_PLANE
Layer is the main plane.

PFD_OVERLAY_PLANE
Layer is the overlay plane.

PFD_UNDERLAY_PLANE
Layer is the underlay plane.



bReserved is reserved and should not be modified.
dwLayerMask is used in conjunction with dwVisibleMask to determine if one layer overlays another. Layers are not supported by the current Microsoft implementation.
dwVisibleMask is used in conjunction with the dwLayerMask to determine if one layer overlays another. Layers are not supported by the current Microsoft implementation.
dwDamageMask indicates when more than one pixel format shares the same frame buffer. If the bitwise AND of the dwDamageMask members of two pixel formats is non-zero, then they share the same frame buffer.
* Chapter 8 explains how this applies to devices with palettes.

Returns
The maximum pixel format supported by the
specified device context, or zero on failure.


Example
This example is from the GLRECT sample program on the CD. It queries the pixel format to see if the device context needs a color palette defined.

PIXELFORMATDESCRIPTOR pfd; // Pixel Format Descriptor
int nPixelFormat; // Pixel format index




// Get the pixel format index and retrieve
the pixel format description
nPixelFormat = GetPixelFormat(hDC);
DescribePixelFormat(hDC, nPixelFormat,
sizeof(PIXELFORMATDESCRIPTOR), &pfd);

// Does this pixel format require a palette?
If not, do not create a
// palette and just return NULL
if(!(pfd.dwFlags & PFD_NEED_PALETTE))
return NULL;

// Go on to create the palette




See Also
ChoosePixelFormat, GetPixelFormat,
SetPixelFormat


GetPixelFormat

Purpose
Retrieves the index of the pixel format currently selected for the given device context.
Include File
<wingdi.h>
Syntax
int GetPixelFormat(HDC hDC);
Description
This function retrieves the selected pixel
format for the device context specified. The pixel format index is a
1-based positive value.


Parameters

hDC

HDC: The device context of interest.
Returns
The index of the currently selected pixel format for the given device, or zero on failure.
Example
See the example given for DescribePixelFormat.
See Also
DescribePixelFormat, ChoosePixelFormat,
SetPixelFormat


SetPixelFormat

Purpose
Sets a device contextłs pixel format.
Include File
<wingdi.h>
Syntax
BOOL SetPixelFormat(HDC hDC, int nPixelFormat, CONST PIXELFORMATDESCRIPTOR * ppfd);
Description
This function actually sets the pixel format
for a device context. Once the pixel format has been selected for a
given device, it cannot be changed. This function must be called before
creating an OpenGL rendering context for the device.


Parameters

hDC

HDC: The device context whose pixel format is to be set.
nPixelFormat

int: Index of the pixel format to be set.
ppfd
LPPIXELFORMATDESCRIPTOR: A pointer to a PIXELFORMATDESCRIPTOR that contains the logical pixel format descriptor. This structure is used internally to record the logical pixel format specification. Its value does not influence the operation of this function.
Returns
True if the specified pixel format was set for the given device context. False if an error occurs.
Example
See the example given for ChoosePixelFormat.
See Also
DescribePixelFormat, GetPixelFormat,
ChoosePixelFormat






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:
095 098 r6zasmwfalugjlutqwlhyvwea6w3ebelfalbo7y
095 098
095 098 fwd4ngz32i2e675g3zotm6opg2a5rl62sfmo5fi
098 103 tb4ari2cfxy6bndjlnlwyasohxtdqgwgcepy5ja
098 ADMM
096 098
092 095
095 096
098 99
092 095
2010 Wykład 12 Pierwiastki d, f elektronoweid 098

więcej podobnych podstron