Skip to content

Added a column-major graphics demo #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ZERICO2005
Copy link
Contributor

Based off the graphx buffered cube example

Uses code from graphy so vsync is properly handled and etc

I got errors from the org keyword used in gfy_FillScreen, so I've implemented it in C with memset instead for now.

@calc84maniac
Copy link
Contributor

I'm not really a fan of the assembly usage in a C example, especially reimplementing stuff from GraphX that could be done just the same by using functions directly from GraphX. The only "unique" thing in the assembly code is the set pixel function, and that could just as easily be done in C (or the line draw functions could be changed to use pointer arithmetic if speed is an issue, as long as clipping isn't needed).

@ZERICO2005
Copy link
Contributor Author

I was not sure how to implement vsync in C, so I reused graphx/graphy functions for it. The purpose for this demo is to show how there is no diagonal screen tearing in column major mode

@calc84maniac
Copy link
Contributor

The point is that you shouldn't reuse graphx functions, this is a library demo so just call gfx functions directly

@ZERICO2005 ZERICO2005 closed this May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants