diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/video/vga.c | 8 | ||||
-rw-r--r-- | src/drivers/video/vga.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/video/vga.c b/src/drivers/video/vga.c index 2080283..9d540af 100644 --- a/src/drivers/video/vga.c +++ b/src/drivers/video/vga.c @@ -253,6 +253,8 @@ bool vga_set_mode( vga_t *vga, const vga_mode_t mode ) vga->mode = mode; vga->mode.segment = get_frame_buffer_segment( vga ); + vga->use_z_buffer = false; + return true; } @@ -380,3 +382,9 @@ void vga_wait_for_retrace( vga_t *vga ) while( !( port8_read( &vga->attribute_controller_reset_port ) & 0x08 ) ); } +void vga_use_z_buffer( vga_t *vga, bool use ) +{ + vga->use_z_buffer = use; +} + + diff --git a/src/drivers/video/vga.h b/src/drivers/video/vga.h index b9a5c87..0f55f74 100644 --- a/src/drivers/video/vga.h +++ b/src/drivers/video/vga.h @@ -42,6 +42,7 @@ typedef struct { port8_t attribute_controller_reset_port; vga_mode_t mode; void *context; + bool use_z_buffer; } vga_t; typedef struct { @@ -81,5 +82,6 @@ void vga_draw_rectangle( vga_t *vga, const int x, const int y, const int w, cons void vga_clear_screen( vga_t *vga, const vga_color_t color ); void vga_draw_char( vga_t *vga, const unsigned char c, const int x, const int y, const vga_color_t background, const vga_color_t foreground ); void vga_wait_for_retrace( vga_t *vga ); +void vga_use_z_buffer( vga_t *vga, bool use ); #endif // VGA_H |