TVP4020
Programmers Reference Manual
Delta Programming Examples
159
// This function draws the mesh as a series of shaded triangles.
void TriangleMesh (gal &cx)
{
__DeltaModeFmat
deltaMode;
__DeltaRenderFmat
drawCmd;
int
vertexStore;
int
rect, v;
// Assume the rendering device is already initialized. Note we
// expect the BiasCoords mode in the RasterizerMode register to be
// set to add a bias of zero.
// Set-up the DeltaMode register.
deltaMode.pad
= 0;
deltamode.ColorOrder
= 0;
deltamode.BackfaceCallEnable
= 0;
deltaMode.TextureParameterMode
= 2;
// Auto normalize.
deltaMode.ClampEnable
= 1;
// Clamp enabled.
deltaMode.NoDraw
= 0;
// Do drawing.
deltaMode.DiamondExit
= 1;
// Not needed for this
// example.
deltaMode.SubPixelCorrectionEnable
= 1;
// Enable sub pixel
// correction.
deltaMode.DiffuseTextureEnable
= 0;
// Disable.
deltaMode.SpecularTextureEnable
= 0;
// Disable.
deltaMode.DepthEnable
= 1;
// Enable.
deltaMode.SmoothShadingEnable
= 1;
// Enable.
deltaMode.TextureEnable
= 0;
// Disabled.
deltaMode.FogEnable
= 1;
// Enabled, but
// controlled from
// the draw command.
deltaMode.Reserved
= 0;
LD_REG (__DeltaTagDeltaMode, *((long *) &deltaMode));
// Set-up the draw command data.
drawCmd.pad
= 0;
drawCmd.ReuseBitMask
= 0;
drawCmd.SubPixelCorrectionEnable
= 1;
// Enable.
drawCmd.RaservedA
= 0;
drawCmd.SyncOnBitMask
= 0;
// Disable.
Содержание TVP4020 PERMEDIA 2
Страница 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Страница 47: ...Memory I O and Organization TVP4020 Programmers Reference Manual 38 Texture address TextureBaseAddress T W S ...
Страница 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Страница 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Страница 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Страница 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Страница 323: ...Index TVP4020 Programmers Reference Manual 314 ...