1
0
Fork 0
forked from AbleOS/ableos
ableos/sysdata/programs/fb_driver/src/examples/front_buffer.hb

19 lines
683 B
Plaintext
Raw Normal View History

2024-08-20 07:03:39 -05:00
.{front_buffer_ptr, front_buffer_copy, get_front_buffer, Buffer} := @use("../lib.hb");
example := fn(): void {
// you can get the raw frontbuffer pointer using
raw_buffer := front_buffer_ptr
// this buffer is the one that you write individual pixels to
// you can gete the copy frontbuffer pointer using
copy_buffer := copy_buffer_ptr
/* this buffer is used for massive writing
operations by taking advantage of
static copying */
// you can construct a buffer like so
buffer := Buffer.{write: raw_buffer, copy: copy_buffer}
// this is the operation that get_front_buffer does
same_buffer := get_front_buffer()
return
}