![Texas Instruments TVP4020 PERMEDIA 2 Скачать руководство пользователя страница 161](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169161.webp)
Delta Programming Examples
TVP4020
Programmers Reference Manual
152
#include "delta.h"
#include <stdio.h>
extern unsigned long *dmaPtr;
extern DMA *dma;
// Change these macros to what is needed to write the values to Delta // Unit, or add them to a
dma buffer.
#define LD_REG(reg, value) dmaPtr = dma->Space(2); *+ = reg;\
*+ = value;
#define LD_PARAM(reg, value) dmaPtr = dma->Space(2); *+ = reg;\
*+ = *((unsigned long *) &value);
// Prototypes
void PointMesh (gal &cx);
void LineMesh (gal &cx);
void TriangleMesh (gal &cx);
// Simple structure to use in the example code
typedef struct { float x, y, z, r, g, b, a; } Vertex;
typedef struct { short x, y; } XY;
typedef struct { XY scissorMin, scissorMax; } ClipRectangle;
// Define some test data.
#define verticesInMesh 7
Vertex mesh[verticesInMesh] = {
//
x
y
z
r
g
b
a
{
10,
300,
0.1,
1.0,
1.0,
1.0,
1.0
},
{
60,
100,
0.2,
1.0,
1.0,
0.0,
1.0
},
{
110,
300,
0.3,
1.0,
0.0,
1.0,
1.0
},
{
160,
100,
0.4,
1.0,
0.0,
0.0,
1.0
},
{
210,
300,
0.5,
0.0,
1.0,
1.0,
1.0
},
{
260,
100,
0.6,
0.0,
1.0,
0.0,
1.0
},
{
310,
300,
0.7,
0.0,
0.0,
1.0,
1.0
}};
#define numberClipRectangles 2
ClipRectangle clipRectangles[numberClipRectangles] = {
{ {110, 0}, {400, 150} },
{ {0, 150}, {400, 350} }};
enum {paramS, paramT, paramQ, paramKs, paramKd, paramR, paramG, paramB, paramA,
paramF, paramX, paramY, paramZ};
Содержание 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 ...