many things, cosmo build!
This commit is contained in:
+9
-9
@@ -91,9 +91,9 @@ static inline void com_gem_draw_triangle(com_pnt_t v0, com_pnt_t v1,
|
||||
// If the point is inside or on all edges, draw the pixel
|
||||
// (Assumes Counter Clockwise vertex ordering)
|
||||
if (ws.a[0] >= 0 && ws.a[1] >= 0 && ws.a[2] >= 0) {
|
||||
out[(y * COM_CFG_WIDTH + x) * 4 + 0] = 125;
|
||||
out[(y * COM_CFG_WIDTH + x) * 4 + 1] = 125;
|
||||
out[(y * COM_CFG_WIDTH + x) * 4 + 2] = 125;
|
||||
out[(y * COM_CFG_WIDTH + x) * COM_CFG_COLORS + 0] = 125;
|
||||
out[(y * COM_CFG_WIDTH + x) * COM_CFG_COLORS + 1] = 125;
|
||||
out[(y * COM_CFG_WIDTH + x) * COM_CFG_COLORS + 2] = 125;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,9 +147,9 @@ com_gem_draw_triangle_textured_edge(com_pnt_t v0, com_pnt_t v1, com_pnt_t v2,
|
||||
// uint32_t bidx = com_zord_order(x, y);
|
||||
uint32_t bidx = y * COM_CFG_WIDTH + x;
|
||||
|
||||
out[bidx * 4 + 0] = tex[idx * 3 + 0];
|
||||
out[bidx * 4 + 1] = tex[idx * 3 + 1];
|
||||
out[bidx * 4 + 2] = tex[idx * 3 + 2];
|
||||
out[bidx * COM_CFG_COLORS + 0] = tex[idx * 3 + 0];
|
||||
out[bidx * COM_CFG_COLORS + 1] = tex[idx * 3 + 1];
|
||||
out[bidx * COM_CFG_COLORS + 2] = tex[idx * 3 + 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,9 +170,9 @@ static inline void draw_span(int32_t x_start_fp, int32_t x_end_fp, int y,
|
||||
for (int x = x1; x < x2; x++) {
|
||||
uint32_t idx = 0 * 32 + 0;
|
||||
uint32_t bidx = y * COM_CFG_WIDTH + x;
|
||||
out[bidx * 4 + 0] = tex[idx * 3 + 0];
|
||||
out[bidx * 4 + 1] = tex[idx * 3 + 1];
|
||||
out[bidx * 4 + 2] = tex[idx * 3 + 2];
|
||||
out[bidx * COM_CFG_COLORS + 0] = tex[idx * 3 + 0];
|
||||
out[bidx * COM_CFG_COLORS + 1] = tex[idx * 3 + 1];
|
||||
out[bidx * COM_CFG_COLORS + 2] = tex[idx * 3 + 2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user