pub trait VramRegionSource {
// Required methods
fn alloc_page_run(
&mut self,
count: u16,
depth: TextureDepth,
page_y: u16,
) -> Option<(TexturePage, VramHandle)>;
fn alloc_clut(&mut self, entries: u16) -> Option<(Clut, VramHandle)>;
}Expand description
Source of VRAM regions for crates that should not depend on the whole
VramAllocator type (e.g. psx-font). VramAllocator implements it.
Required Methods§
Sourcefn alloc_page_run(
&mut self,
count: u16,
depth: TextureDepth,
page_y: u16,
) -> Option<(TexturePage, VramHandle)>
fn alloc_page_run( &mut self, count: u16, depth: TextureDepth, page_y: u16, ) -> Option<(TexturePage, VramHandle)>
Reserve count contiguous texture pages at page row page_y
(0 or 256), returning the base TexturePage and a free handle.
Sourcefn alloc_clut(&mut self, entries: u16) -> Option<(Clut, VramHandle)>
fn alloc_clut(&mut self, entries: u16) -> Option<(Clut, VramHandle)>
Reserve a CLUT of entries palette slots (16 for 4bpp, 256 for 8bpp).