Skip to content

Commit

Permalink
Add byte pixel format
Browse files Browse the repository at this point in the history
  • Loading branch information
LMP88959 authored Feb 2, 2023
1 parent 0889155 commit 3d9144a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int hue = 0;
In your initialization function:
```c
/* pass it the buffer to be drawn on screen */
crt_init(&crt, screen_width, screen_height, screen_buffer);
crt_init(&crt, screen_width, screen_height, CRT_PIX_FORMAT_RGBA, screen_buffer);
/* specify some settings */
crt.blend = 1;
crt.scanlines = 1;
Expand All @@ -142,7 +142,8 @@ crt.scanlines = 1;
In your drawing loop:
```c
ntsc.rgb = video_buffer; /* buffer from your rendering */
ntsc.data = video_buffer; /* buffer from your rendering */
ntsc.format = CRT_PIX_FORMAT_RGBA;
ntsc.w = video_width;
ntsc.h = video_height;
ntsc.as_color = color;
Expand Down

0 comments on commit 3d9144a

Please sign in to comment.