Skip to content

X coordinates -1.0 to 1.0 don't span the whole viewport #1

Description

@mulle-nat

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 ?

Screenshot from 2020-03-02 15-59-32

Otherwise this is a really cool project. I am having quite a bit of fun with it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions