aboutsummaryrefslogtreecommitdiffstats
path: root/samplecode/vertexdump.cpp
blob: c124ad85b0b9d2f2b83d61f01885f4e64fa71368 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include "SkPoint.h"

void setup_vertexbug(SkPoint verts[], SkPoint texs[], uint16_t index[]);

void setup_vertexbug(SkPoint verts[], SkPoint texs[], uint16_t index[]) {
    verts[0].set(SkFloatToScalar(107), SkFloatToScalar(189));
    texs[0].set(SkFloatToScalar(0), SkFloatToScalar(0));
    verts[1].set(SkFloatToScalar(116), SkFloatToScalar(189));
    texs[1].set(SkFloatToScalar(9), SkFloatToScalar(0));
    verts[2].set(SkFloatToScalar(203), SkFloatToScalar(189));
    texs[2].set(SkFloatToScalar(35), SkFloatToScalar(0));
    verts[3].set(SkFloatToScalar(212), SkFloatToScalar(189));
    texs[3].set(SkFloatToScalar(44), SkFloatToScalar(0));
    verts[4].set(SkFloatToScalar(107), SkFloatToScalar(198));
    texs[4].set(SkFloatToScalar(0), SkFloatToScalar(9));
    verts[5].set(SkFloatToScalar(116), SkFloatToScalar(198));
    texs[5].set(SkFloatToScalar(9), SkFloatToScalar(9));
    verts[6].set(SkFloatToScalar(203), SkFloatToScalar(198));
    texs[6].set(SkFloatToScalar(35), SkFloatToScalar(9));
    verts[7].set(SkFloatToScalar(212), SkFloatToScalar(198));
    texs[7].set(SkFloatToScalar(44), SkFloatToScalar(9));
    verts[8].set(SkFloatToScalar(107), SkFloatToScalar(224));
    texs[8].set(SkFloatToScalar(0), SkFloatToScalar(39));
    verts[9].set(SkFloatToScalar(116), SkFloatToScalar(224));
    texs[9].set(SkFloatToScalar(9), SkFloatToScalar(39));
    verts[10].set(SkFloatToScalar(203), SkFloatToScalar(224));
    texs[10].set(SkFloatToScalar(35), SkFloatToScalar(39));
    verts[11].set(SkFloatToScalar(212), SkFloatToScalar(224));
    texs[11].set(SkFloatToScalar(44), SkFloatToScalar(39));
    verts[12].set(SkFloatToScalar(107), SkFloatToScalar(233));
    texs[12].set(SkFloatToScalar(0), SkFloatToScalar(48));
    verts[13].set(SkFloatToScalar(116), SkFloatToScalar(233));
    texs[13].set(SkFloatToScalar(9), SkFloatToScalar(48));
    verts[14].set(SkFloatToScalar(203), SkFloatToScalar(233));
    texs[14].set(SkFloatToScalar(35), SkFloatToScalar(48));
    verts[15].set(SkFloatToScalar(212), SkFloatToScalar(233));
    texs[15].set(SkFloatToScalar(44), SkFloatToScalar(48));
    index[0] = 0; index[1] = 5; index[2] = 1;
    index[3] = 0; index[4] = 4; index[5] = 5;
#if 0
    index[6] = 1; index[7] = 6; index[8] = 2;
#else
    index[6] = 6; index[7] = 2; index[8] = 1;
#endif
    index[9] = 1; index[10] = 5; index[11] = 6;
    index[12] = 2;
    index[13] = 7;
    index[14] = 3;
    index[15] = 2;
    index[16] = 6;
    index[17] = 7;
    index[18] = 4;
    index[19] = 9;
    index[20] = 5;
    index[21] = 4;
    index[22] = 8;
    index[23] = 9;
    index[24] = 5;
    index[25] = 10;
    index[26] = 6;
    index[27] = 5;
    index[28] = 9;
    index[29] = 10;
    index[30] = 6;
    index[31] = 11;
    index[32] = 7;
    index[33] = 6;
    index[34] = 10;
    index[35] = 11;
    index[36] = 8;
    index[37] = 13;
    index[38] = 9;
    index[39] = 8;
    index[40] = 12;
    index[41] = 13;
    index[42] = 9;
    index[43] = 14;
    index[44] = 10;
    index[45] = 9;
    index[46] = 13;
    index[47] = 14;
    index[48] = 10;
    index[49] = 15;
    index[50] = 11;
    index[51] = 10;
    index[52] = 14;
    index[53] = 15;
}