EasyManuals Logo
Home>HP>Desktop>b2600

HP b2600 Reference Guide

HP b2600
486 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #403 background imageLoading...
Page #403 background image
S
glStencilFunc
Chapter 17
403
glStencilFunc
glStencilFunc: set function and reference value for stencil testing.
C Specification
void glStencilFunc(
GLenum func,
GLint ref,
GLuint mask)
Parameters
func Specifies the test function. Eight tokens are valid: GL_NEVER,
GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL, GL_EQUAL,
GL_NOTEQUAL, and GL_ALWAYS. The initial value is GL_ALWAYS.
ref Specifies the reference value for the stencil test. ref is clamped to the
range [0, 2
n
- 1], where n is the number of bitplanes in the stencil
buffer. The initial value is 0.
mask Specifies a mask that is ANDed with both the reference value and the
stored stencil value when the test is done. The initial value is all 1s.
Description
Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You
draw into the stencil planes using GL drawing primitives, then render geometry and
images,using the stencil planesto mask out portions of the screen.Stenciling is typically
used in multipass rendering algorithms to achieve special effects, such as decals,
outlining, and constructive solid geometry rendering.
The stencil test conditionally eliminates a pixel based on the outcome of a comparison
between the reference value and the value in the stencil buffer. To enable and disable the
test, call glEnable and glDisable with argument GL_STENCIL_TEST. To specify actions
based on the outcome of the stencil test, call glStencilOp.
func is a symbolic constant that determines the stencil comparison function. It accepts
one of eight values, shown in the following list. ref is an integer reference value that is
used in the stencil comparison. It is clamped to the range [0, 2
n
- 1], where n is the
number of bitplanes in the stencil buffer. mask is bitwise anded with both the reference
value and the stored stencil value, with the anded values participating in the
comparison.
If stencil represents the value stored in the corresponding stencil buffer location, the
following list shows the effect of each comparison function that can be specified by func.
Only if the comparison succeeds is the pixel passed through to the next stage in the
rasterization process (see glStencilOp). All tests treat stencil values as unsigned integers
in the range [0, 2
n
- 1], where n is the number of bitplanes in the stencil buffer.

Table of Contents

Other manuals for HP b2600

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP b2600 and is the answer not in the manual?

HP b2600 Specifications

General IconGeneral
BrandHP
Modelb2600
CategoryDesktop
LanguageEnglish

Related product manuals