Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Redesign text rendering. #6

Closed
lennart-benschop opened this issue May 19, 2023 · 1 comment
Closed

Redesign text rendering. #6

lennart-benschop opened this issue May 19, 2023 · 1 comment

Comments

@lennart-benschop
Copy link
Contributor

I'm less than happy with the way the entire canvas is re-rendered each frame from the text data.
As soon as we add line drawing and whatnot, we cannot store the parameters of all lines drawn and re-render them each time.
Think of the triangles.bas demo that keeps drawing triangles indefinitely, where each triangle overwrites parts of previous ones.

So I would like to draw all characters, lines etc. onto one 'surface' (which may or may not be the window's own canvas) and then possibly blit this into the window's canvas each frame. This way we may be able to draw sprites on top of this when we get to that (or the cursor possibly). When scrolling we move part of the 'surface' using an appropriate blit function. Characters can be drawn by plotting each pixel (first clear the rectangle to the background colour).
The real Agon hardware draws each character as a bitmap into the frame buffer. When you update a character in the font using VDU 23, future instances will be redrawn with the updated pattern, but previously drawn characters will stay as-is.

@astralaster
Copy link
Owner

Looks like a duplicate. -> #5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants