15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci INTEL_texture_scissor
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci GL_INTEL_texture_scissor
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci   $Date: 1997/05/09 02:42:17 $ $Revision: 1.1 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci   135
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    EXT_texture3D is affected by the definition of this extension
205bd8deadSopenharmony_ci    EXT_texture is required
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciOverview
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ciThis extension enables one to render with clipping based on texture 
255bd8deadSopenharmony_cicoordinates. The only way to clip a primitive while rendering in GL 1.1 is
265bd8deadSopenharmony_cito define a Clipping Plane. Clipping of the primitive is then  effected
275bd8deadSopenharmony_cibased on the spatial coordinates of the primitive with reference to the user
285bd8deadSopenharmony_cidefined clipping plane. This extension adds a new dimension to the clipping
295bd8deadSopenharmony_ciof primitives, namely-clipping based on texture coordinates as opposed
305bd8deadSopenharmony_cito spatial coordinates.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciOne of the advantages of clipping planes, is that for a given viewing volume
335bd8deadSopenharmony_ciall the primitives that make up the models in the current scene may be
345bd8deadSopenharmony_ciclipped against a set of clipping planes that are defined once at the start
355bd8deadSopenharmony_cifor the current viewing volume. Two issues that are worth  mentioning in
365bd8deadSopenharmony_cithis case are :
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci1. The cost of defining clipping planes is amortized over all primitives in
395bd8deadSopenharmony_cithe scene
405bd8deadSopenharmony_ci2. The job of determining the equation of clipping planes that  enclose a
415bd8deadSopenharmony_ciconvex region defining the  current viewing volume is fairly straightforward.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ciBoth the above factors that make clip planes so profitable in 3D graphics
445bd8deadSopenharmony_cirendering, do not necessarily hold true when dealing with 3D texture mapped
455bd8deadSopenharmony_cibased volume rendering of large volume datasets. This    is specifically
465bd8deadSopenharmony_citrue when one uses 3D texture mapping hardware to do volumetric morphing of
475bd8deadSopenharmony_cilarge volumes. Three factors require the ability to clip based on texture
485bd8deadSopenharmony_cicoordinates
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ciFirst, most texture memory in machines are never large enough to fit the
515bd8deadSopenharmony_cientire volumetric dataset. Hence, to use 3D texture mapping to render
525bd8deadSopenharmony_civolumes, one has to partition the volume into blocks large enough to fit in
535bd8deadSopenharmony_cithe available texture memory. This requires one to clip the primitives the
545bd8deadSopenharmony_cistraddle texture block boundaries, for oblique viewing angles. In
555bd8deadSopenharmony_cistraightforward volume rendering, this clipping may be easily done through
565bd8deadSopenharmony_cithe definition of clip planes in GL, because there is a linear correspondence
575bd8deadSopenharmony_cibetween the texture coordinate 'w' and the spatial coordinate 'z' of each
585bd8deadSopenharmony_cipoint in the volume.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ciSecond, when one morphs a source volume to obtain the target volume, the
615bd8deadSopenharmony_cilinear correspondence between the texture coordinate 'w' and the spatial
625bd8deadSopenharmony_cicoordinate 'z' of each point in the volume is lost. Because    morphs are
635bd8deadSopenharmony_ciinherently non-linear different points in the original volume (identified
645bd8deadSopenharmony_ciby a unique 'z' and an unique 'w') are mapped to different locations in the
655bd8deadSopenharmony_citarget and in the process lose their linear relationship. Thus no one set
665bd8deadSopenharmony_ciof clipping planes can be defined for all the primitives that result when
675bd8deadSopenharmony_cirendering morphed volumes. 
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciThird, even if one were to try and define clip planes for each of the
705bd8deadSopenharmony_ciresulting primitives when rendering morphed volumes, the equations are not
715bd8deadSopenharmony_cieasy to determine - both in terms of speed and ease of     implementation!
725bd8deadSopenharmony_ciOne has to first determine the intersection points where the texture
735bd8deadSopenharmony_cicoordinate goes out of bounds, i.e. below 0.0 or above 1.0, and then define
745bd8deadSopenharmony_cia planes that would encapsulte those parts of the primitive that have
755bd8deadSopenharmony_citexture coordinates in the correct range. 
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ciFinally, the fact that all this has to be done in software slows down the
785bd8deadSopenharmony_ciprocess tremendously. 
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ciAn easier solution would be to enable, a simple test in hardware that checks
815bd8deadSopenharmony_cito see if a fragments texel coordinates are within a  user defined range. If
825bd8deadSopenharmony_ciit passes this test the fragment is rendered, if not it is discarded. 
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ciBesides the immediate advantage in performance, this solution would also
855bd8deadSopenharmony_cienable one to simplify application code considerably.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ciAn added benefit of this extension is that it provides one with the facility
885bd8deadSopenharmony_ciof tiling 2D textures in 1D, 2D or 3D.
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ciNew Procedures and Functions 
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_civoid    TexScissorINTEL(GLenum    target, 
935bd8deadSopenharmony_ci                        GLclampf   tlow,
945bd8deadSopenharmony_ci                        GLclampf   thigh);
955bd8deadSopenharmony_civoid    TexScissorFuncINTEL(GLenum    target, Glenum lfunc, Glenum hfunc)
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ciNew Tokens
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ciAccepted by the <cap> parameter of  Enable, Disable, IsEnabled :
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ciTEXTURE_SCISSOR_INTEL
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ciAccepted by the <pname> parameter of parameter of GetBooleanv, GetIntegerv,
1045bd8deadSopenharmony_ciGetFloatv, and GetDoublev 
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ciTEXTURE_SCISSOR_S_INTEL [ returns two values : low and high ]
1075bd8deadSopenharmony_ciTEXTURE_SCISSOR_T_INTEL [ returns two values : low and high ]
1085bd8deadSopenharmony_ciTEXTURE_SCISSOR_R_INTEL [ returns two values : low and high ]
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ciby the <target> parameter of glTexScissorINTEL and glTexScissorFuncINTEL
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci	GL_S
1135bd8deadSopenharmony_ci	GL_T
1145bd8deadSopenharmony_ci	GL_R
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL 1.1 Specification
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ciNone
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL 1.1 Specification (Rasterization)
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ciNone
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL 1.1 Specification (Per Fragment Operations
1265bd8deadSopenharmony_ciand the Framebuffer)
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ciThe INTEL_texturescissor conditionally discards a fragment based on the
1295bd8deadSopenharmony_cioutcome of a comparison between the texture coordinate value of the incoming
1305bd8deadSopenharmony_cifragment and the texture bounds set by the TexScissorINTEL() function. The
1315bd8deadSopenharmony_citest is controlled with 
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_civoid TexScissorINTEL(GLenum target, GLclampf tlow, GLclampf thigh)
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciThe texture scissor test is controlled by the texture function set by
1365bd8deadSopenharmony_ciTexScissorFuncINTEL() :
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci void TexScissorFuncINTEL(GLenum target, GLenum lfunc, Glenum hfunc)
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_cilfunc can be any of GL_GREATER, GL_GEQUAL, or GL_EQUAL while lfunc can be
1415bd8deadSopenharmony_ciany of GL_LESS, GL_LEQUAL or GL_EQUAL. These values enable one to handle
1425bd8deadSopenharmony_ciboundary cases that involve adjacent regions overlapping.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciThus, for lfunc set to GL_GEQUAL and hfunc set to GL_LEQUAL, if the target
1455bd8deadSopenharmony_citexture coordinate (s, t, or r) is greater than or equal to tlow and less
1465bd8deadSopenharmony_cithan or equal to thigh (i.e. tlow <= s, t, r <= thigh), the texture test
1475bd8deadSopenharmony_cipasses. Otherwise, the test fails and the fragment is discarded. The test
1485bd8deadSopenharmony_ciis enabled or disabled with the Enable and Disable commands, using the
1495bd8deadSopenharmony_cisymbolic constant TEXTURE_SCISSOR_INTEL. When disabled, the texture scissor
1505bd8deadSopenharmony_citest is not performed and it is as if the texture scissor test always passes.
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci'tlow' and 'thigh' are two floating point values in the range <0.0, 1.0>
1535bd8deadSopenharmony_ci(tlow is always less than or equal to thigh). The default values are 0.0 for
1545bd8deadSopenharmony_citlow and 1.0 for thigh. Initially, the texture scissor test is disabled by
1555bd8deadSopenharmony_cidefault.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL 1.1 Specification (Special Functions)
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciNone
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL 1.1 Specification (State and State Requests)
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciNone
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ciAdditions to GLX Specification
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ciNone
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ciGLX Protocol
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ciNone
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ciDependencies on EXT_texture3D
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ciIf EXT_texture3D is not supported, references to texture target GL_R are
1765bd8deadSopenharmony_ciinvalid and should be ignored.
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ciErrors
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ciINVALID_VALUE is generated if glTexScissorINTEL() is called with  tlow > thigh.
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ciINVALID_VALUE is generated if glTexScissorINTEL() is called with  tlow < 0.0
1835bd8deadSopenharmony_cior  tlow > 1.0
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ciINVALID_VALUE is generated if glTexScissorINTEL() is called with  thigh < 0.0
1865bd8deadSopenharmony_cior thigh > 1.0
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ciINVALID_VALUE is generated if glTexScissorFuncINTEL() is called with lfunc or
1895bd8deadSopenharmony_cihfunc set to any other value other than [GL_GREATER, GL_GEQUAL, or GL_EQUAL]
1905bd8deadSopenharmony_ciand [GL_LESS, GL_LEQUAL or GL_EQUAL] respectively.
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ciNew State
1945bd8deadSopenharmony_ci
1955bd8deadSopenharmony_ciNone
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ciNew Implementation Dependent State
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ciGet Value                  Get Command Type   Initial Value        Attribute
2015bd8deadSopenharmony_ciTEXTURE_SCISSOR_INTEL      IsEnabled    B        False         texture / enable
2025bd8deadSopenharmony_ciTEXTURE_SCISSOR_S_INTEL    GetFloatv    R      0.0, 1.0        texture / enable
2035bd8deadSopenharmony_ciTEXTURE_SCISSOR_T_INTEL    GetFloatv    R      0.0, 1.0        texture / enable
2045bd8deadSopenharmony_ciTEXTURE_SCISSOR_R_INTEL    GetFloatv    R      0.0, 1.0        texture / enable
2055bd8deadSopenharmony_ciTEXTURE_SCISSOR_FUNC_INTEL GetIntegerv  Z6 GL_GEQUAL, GL_LESS  texture / enable
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci
208