[gpu] Add graphics and adapter
This commit is contained in:
17
src/graphics/graphics_adapter.rs
Normal file
17
src/graphics/graphics_adapter.rs
Normal 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!()
|
||||
}
|
||||
}
|
||||
|
@@ -1 +1,2 @@
|
||||
pub mod color;
|
||||
pub mod color;
|
||||
pub mod graphics_adapter;
|
Reference in New Issue
Block a user