Go to file
Marcus Vinicius de Carvalho 03b943eeca Chip-8: From Rect to Textures
The main contribution of this commit is changing the display rendering method. Before, I was asking the canvas to render rectangles, which represented scaled pixesl. Now I am using a texture, that is automatically stretched to the whole canvas by SDL.

The display coding is running faster, but there is still some ways to improve rendering. The main one is to change the cpu display buffer from a multi-dimensional array of booleans (indincating pixels toggling) to a single dimension pixel-color array. In the pixel-color array, 4u8 samples represent a single pixel on screen (R: u8, G: u8, B: u8, A:u8).

This refactor will force the CPU to control have knowledge of which color will be printed on the display, letting the display being agnostic to implementation details.

This refactor will be added as an issue to the github project kanban and further analyzed.

Besides that, other changes to the codebase were mainly in terms of code organization.
2021-07-30 15:02:08 +08:00
src Chip-8: From Rect to Textures 2021-07-30 15:02:08 +08:00
.gitignore Static-link to SDL2 2021-07-24 23:20:46 +08:00
Cargo.toml Rust fmt 2021-07-25 20:11:18 +08:00
LICENSE Initial commit 2021-07-21 11:08:37 +08:00