forked from AbleOS/ableos
19 lines
683 B
Plaintext
19 lines
683 B
Plaintext
|
.{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
|
||
|
}
|