md
This commit is contained in:
parent
53df70b4f1
commit
c8f1c90f9c
9 changed files with 0 additions and 0 deletions
32
example/HelloDrawing/README.md
Normal file
32
example/HelloDrawing/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# HelloWindow Example
|
||||
|
||||
## Description
|
||||
|
||||
This example demonstrates how to draw pixels to a window.
|
||||
|
||||
## Expected Result
|
||||
|
||||
A window with a red colored square.
|
||||
|
||||
## Highlighted Code Snippet
|
||||
|
||||
```cpp
|
||||
for(uint32_t x = 0; x < 1280; x++) {
|
||||
for(uint32_t y = 0; y < 720; y++) {
|
||||
window.framebuffer[x*720+y].r = 255;
|
||||
window.framebuffer[x*720+y].g = 0;
|
||||
window.framebuffer[x*720+y].b = 0;
|
||||
window.framebuffer[x*720+y].a = 255;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## How to Run
|
||||
|
||||
```bash
|
||||
crafter-build -c example -r
|
||||
```
|
||||
|
||||
## Relevant documentation
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue