Skip to content

Commit 6506b9a

Browse files
committed
use flat_color in atlas
1 parent bded5bf commit 6506b9a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/atlas/atlas.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
8181

8282
gsKit_set_clamp(gsGlobal, GS_CMODE_CLAMP);
8383

84-
GSPRIMUVPOINT *verts = (GSPRIMUVPOINT*)malloc(sizeof(GSPRIMUVPOINT) * totalVertices);
84+
GSPRIMUVPOINTFLAT *verts = (GSPRIMUVPOINTFLAT*)malloc(sizeof(GSPRIMUVPOINTFLAT) * totalVertices);
8585
for (int i = 0; i < TOTAL_RUNNERS_SCREEN; i++) {
8686
int line = i / RUNNER_PER_LINE_SCREEN;
8787
int col = i % RUNNER_PER_LINE_SCREEN;
@@ -92,10 +92,7 @@ int main(int argc, char *argv[])
9292
int y1 = y0 + RUNNER_HEIGHT;
9393

9494
verts[i*2].xyz2 = vertex_to_XYZ2(gsGlobal, x0, y0, 0);
95-
verts[i*2].rgbaq = color;
96-
9795
verts[i*2+1].xyz2 = vertex_to_XYZ2(gsGlobal, x1, y1, 0);
98-
verts[i*2+1].rgbaq = color;
9996
}
10097

10198
while(1)
@@ -108,7 +105,7 @@ int main(int argc, char *argv[])
108105
}
109106

110107
gsKit_clear(gsGlobal, White);
111-
gskit_prim_list_sprite_texture_uv_3d(gsGlobal, &atlas, totalVertices, verts);
108+
gskit_prim_list_sprite_texture_uv_flat_color(gsGlobal, &atlas, color, totalVertices, verts);
112109

113110
gsKit_queue_exec(gsGlobal);
114111
gsKit_sync_flip(gsGlobal);

0 commit comments

Comments
 (0)