commit
This commit is contained in:
parent
e7d0bc8f8e
commit
e795ab880c
6 changed files with 89 additions and 24 deletions
|
|
@ -11,8 +11,8 @@ 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++) {
|
||||
for(std::uint_fast32_t x = 0; x < 1280; x++) {
|
||||
for(std::uint_fast32_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;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ using namespace Crafter;
|
|||
int main() {
|
||||
WindowWaylandWayland window("HelloWindow", 1280, 720);
|
||||
|
||||
for(uint32_t x = 0; x < 1280; x++) {
|
||||
for(uint32_t y = 0; y < 720; y++) {
|
||||
for(std::uint_fast32_t x = 0; x < 1280; x++) {
|
||||
for(std::uint_fast32_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;
|
||||
|
|
@ -15,8 +15,8 @@ int main() {
|
|||
}
|
||||
|
||||
//Semi transparant version:
|
||||
// for(uint32_t x = 0; x < 1280; x++) {
|
||||
// for(uint32_t y = 0; y < 720; y++) {
|
||||
// for(std::uint_fast32_t x = 0; x < 1280; x++) {
|
||||
// for(std::uint_fast32_t = 0; y < 720; y++) {
|
||||
// window.framebuffer[x*720+y].r = 128;//alpha channel must be premultiplied
|
||||
// window.framebuffer[x*720+y].g = 0;
|
||||
// window.framebuffer[x*720+y].b = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue