Game Development Reference
In-Depth Information
The following figure shows the outputs of the different wrapping modes:
Testing the texture wrapping mode
The code in the
04-SquareWithTextureWrapping.html
file gives us options to try
texture wrapping for both
s
and
t
values separately. Open the file in your favorite
text editor. We will see the various changes that we made in the code.
The HTML
We have added two select boxes to list different wrapping modes for
s
and
t
values,
with IDs
sclamp
and
tclamp
respectively, as shown in the following code snippet:
<div>
<label for="sclamp">Clamping Mode S</label>
<select id="sclamp" name="sclamp">
<option value="REPEAT">REPEAT</option>
<option value="CLAMP_TO_EDGE">CLAMP_TO_EGDE</option>
<option value="MIRRORED_REPEAT">MIRRORED_REPEAT</option>
</select>
<label for="tclamp">Clamping Mode T</label>
<select id="tclamp" name="tclamp">