-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
42 lines (34 loc) · 1.03 KB
/
test.c
File metadata and controls
42 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//Tests GFX_clip triangle
/* VECTOR2 vertexes[3];
VECTOR2 uvs[3];
float heights[3];
VECTOR2 clip_vertexes[4];
VECTOR2 clip_uvs[4];
float clip_heights[4];
vertexes[0] = vector2(2., 2.);
vertexes[1] = vector2(0., -2.);
vertexes[2] = vector2(-2., 2.);
uvs[0] = vector2(1,0);
uvs[1] = vector2(0,0);
uvs[2] = vector2(0,1);
heights[0] = 1.;
heights[1] = 0.;
heights[2] = 2.;
GFX_clip_tri( vertexes, uvs, heights,
clip_vertexes, clip_uvs, clip_heights);
printf("v0x %f v0y %f v1x %f v1y %f v2x %f v2y %f v3x %f v3y %f\n",
clip_vertexes[0].x, clip_vertexes[0].y,
clip_vertexes[1].x, clip_vertexes[1].y,
clip_vertexes[2].x, clip_vertexes[2].y,
clip_vertexes[3].x, clip_vertexes[3].y);
printf("v0u %f v0v %f v1u %f v1v %f v2u %f v2v %f v3u %f v3v %f\n",
clip_uvs[0].x, clip_uvs[0].y,
clip_uvs[1].x, clip_uvs[1].y,
clip_uvs[2].x, clip_uvs[2].y,
clip_uvs[3].x, clip_uvs[3].y);
printf("v0h %f v1h %f v2h %f v3h %f\n",
clip_heights[0],
clip_heights[1],
clip_heights[2],
clip_heights[3]);
*/