Ich versuche immer noch einen "einfachen" Testfall zu konstruieren. Habe einiges vom softhcuvid zusammenkoppiert:
test.c.txt
Stecke aber noch etwas fest:
#define COL { 0xff, 0x00, 0x00, 0xff }
static unsigned char data_5x5[5][5][4] = {
{ COL, COL, COL, COL, COL },
{ COL, COL, COL, COL, COL },
{ COL, COL, COL, COL, COL },
{ COL, COL, COL, COL, COL },
{ COL, COL, COL, COL, COL },
};
const int width = 5, height = 5;
struct pl_plane img5x5 = {0};
const struct pl_tex *img5x5_tex = NULL;
bool ok = pl_upload_plane(gpu, &img5x5, &img5x5_tex, &(struct pl_plane_data) {
.type = PL_FMT_UNORM,
.width = width,
.height = height,
.component_size = { 8, 8, 8, 8 },
.component_map = { 0, 1, 2, 3 },
.pixel_stride = 4,
.pixels = &data_5x5,
});
struct pl_image image = {
.signature = 0,
.num_planes = 1,
.planes = { img5x5 },
.repr = {
.sys = PL_COLOR_SYSTEM_BT_709,
.levels = PL_COLOR_LEVELS_PC,
},
.color = pl_color_space_bt709,
.width = width,
.height = height,
.src_rect = {-1.0, 0.0, width - 1.0, height},
};
Display More
Das soll später mit pl_render_image gerendert werden. Aber irgendwie bleibt das Bild schwarz.
Irgend eine Idee