[Teton] Draw a green square into the framebuffer.
This commit is contained in:
parent
28719ac726
commit
fb458e6fd4
4 changed files with 45 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
|||
#include <mammoth/init.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
|
||||
#include "framebuffer/framebuffer.h"
|
||||
|
||||
uint64_t main(uint64_t init_port) {
|
||||
ParseInitPort(init_port);
|
||||
|
||||
|
|
@ -12,8 +14,17 @@ uint64_t main(uint64_t init_port) {
|
|||
|
||||
FramebufferInfo framebuffer;
|
||||
RET_ERR(client.GetFramebufferInfo({}, framebuffer));
|
||||
dbgln("FB addr {x}, width {} , height {}", framebuffer.address_phys(),
|
||||
framebuffer.width(), framebuffer.height());
|
||||
dbgln("FB addr {x}, bpp {}, width {} , height {}, pitch {}",
|
||||
framebuffer.address_phys(), framebuffer.bpp(), framebuffer.width(),
|
||||
framebuffer.height(), framebuffer.pitch());
|
||||
|
||||
Framebuffer fbuf(framebuffer);
|
||||
|
||||
for (uint64_t r = 0; r < 20; r++) {
|
||||
for (uint64_t c = 0; c < 20; c++) {
|
||||
fbuf.DrawPixel(r, c, 0x0000FF00);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Parse a font file.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue