[gpu] Add graphics and adapter

This commit is contained in:
2024-02-18 15:11:37 +05:30
parent 91702f3997
commit 7492ba8dd3
5 changed files with 90 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
use crate::emu::graphics::{DEVICE_FRAMEBUFFER_SIZE, GraphicsProcessor};
use crate::misc::result::EmulatorResult;
pub trait GraphicsAdapter{
fn draw(&mut self,frame_buf:&[u8;DEVICE_FRAMEBUFFER_SIZE])->EmulatorResult<()>;
}
pub struct SDLGraphicsAdapter{
graphics_processor: GraphicsProcessor
}
impl GraphicsAdapter for SDLGraphicsAdapter{
fn draw(&mut self, frame_buf: &[u8; DEVICE_FRAMEBUFFER_SIZE]) -> EmulatorResult<()> {
todo!()
}
}