![background image](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169088.webp)
TVP4020
Programmers Reference Manual
Graphics Programming
79
In addition a comparison bit mask is supplied in the StencilData register.
This is used to establish which bits of the source and reference value
are used in the stencil function test.
The source stencil value can be from a number of places as controlled
by a field in the StencilMode register:
LBWriteData
Stencil
Use
Test logic
This is the normal mode.
Stencil register
This is used, for instance, in the OpenGL draw pixels function where
the host supplies the stencil values in the Stencil register.
It is used when a constant stencil value is needed, for example
when clearing the stencil buffer .
LBSourceData:
(stencil value read
from the localbuffer)
This is used, for instance, in the OpenGL copy pixels function when
the stencil planes are to be copied to the destination. The source is
offset from the destination by the value in LBSourceOffset register.
Source stencil value
read from the
localbuffer
This is used, for instance, in the OpenGL copy pixels function when
the stencil planes in the destination are not to be updated. The
stencil data will come from the localbuffer data.
Table 5.12
Stencil Sources
See
The OpenGL Reference Manual and The OpenGL Programming
Guide from Addison-Wesley for more details of the stencil operations
and examples of its use.
5.6.2
Depth Test
This test is only performed if all the preceding tests (bitmask, scissor,
stipple) have passed. The comparison tests available are:
Mode
Comparison Function
0
Never
1
Less
2
Equal
3
Less Than or Equal
4
Greater
5
Not Equal
6
Greater Than or Equal
7
Always
Table 5.13
Depth Comparison Modes
The test compares the fragment's depth against a source depth value. If
the compare function is LESS and the result is true then the fragment
value is less than the source value. The source value can be obtained
from a number of places as controlled by a field in the DepthMode
register.
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...