/apps/demos/scenery: use quads
This commit is contained in:
parent
f57525cea6
commit
5f3920fdba
@ -153,26 +153,12 @@ static void draw_terrain(SceneIngame *scn) {
|
|||||||
float d2 = heightmap[lx + 1][ly - 1];
|
float d2 = heightmap[lx + 1][ly - 1];
|
||||||
float d3 = heightmap[lx][ly - 1];
|
float d3 = heightmap[lx][ly - 1];
|
||||||
|
|
||||||
draw_triangle("/assets/grass.png",
|
draw_quad("/assets/grass.png",
|
||||||
(Vec3){ (float)x, d0, (float)y },
|
(Vec3){ (float)x, d0, (float)y },
|
||||||
(Vec3){ (float)x + 1, d1, (float)y },
|
|
||||||
(Vec3){ (float)x, d3, (float)y - 1 },
|
|
||||||
(Vec2){ 128, 128 },
|
|
||||||
(Vec2){ 128, 0 },
|
|
||||||
(Vec2){ 0, 128 },
|
|
||||||
(Color){255, 255, 255, 255},
|
|
||||||
(Color){255, 255, 255, 255},
|
|
||||||
(Color){255, 255, 255, 255});
|
|
||||||
|
|
||||||
draw_triangle("/assets/grass.png",
|
|
||||||
(Vec3){ (float)x + 1, d1, (float)y },
|
(Vec3){ (float)x + 1, d1, (float)y },
|
||||||
(Vec3){ (float)x + 1, d2, (float)y - 1 },
|
(Vec3){ (float)x + 1, d2, (float)y - 1 },
|
||||||
(Vec3){ (float)x, d3, (float)y - 1 },
|
(Vec3){ (float)x, d3, (float)y - 1 },
|
||||||
(Vec2){ 128, 0 },
|
(Rect){ .w = 128, .h = 128 },
|
||||||
(Vec2){ 0, 0 },
|
|
||||||
(Vec2){ 0, 128 },
|
|
||||||
(Color){255, 255, 255, 255},
|
|
||||||
(Color){255, 255, 255, 255},
|
|
||||||
(Color){255, 255, 255, 255});
|
(Color){255, 255, 255, 255});
|
||||||
|
|
||||||
draw_billboard("/assets/grasses/10.png",
|
draw_billboard("/assets/grasses/10.png",
|
||||||
|
Loading…
Reference in New Issue
Block a user