swrast
swrast copied to clipboard
X coordinates -1.0 to 1.0 don't span the whole viewport
I modified the subpixel example so it should fill the whole screen:
framebuffer_clear(ctx.target, 0xFF, 0x0, 0, 0xFF);
ia_begin(&ctx);
ia_color(&ctx, 1.0f, 1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, -1.0, -1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, 1.0f, -1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, -1.0f, 1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, 1.0f, 1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, -1.0f, 1.0f, 0.0f, 1.0f);
ia_vertex(&ctx, 1.0f, -1.0f, 0.0f, 1.0f);
ia_end(&ctx);
But there is a small unfilled part on the right side of the window. Looks like a rounding error maybe ?
Otherwise this is a really cool project. I am having quite a bit of fun with it.