Struct evegfx::low_level::LowLevel [−][src]
LowLevel
is a low-level interface to EVE controllers which matches
the primitive operations used in Programmers Guides for the various
EVE controllers.
This is slightly higher-level than the Interface
trait, providing
size-specific memory accesses, but doesn't have any special knowledge
about the memory map or command set of any particular EVE implementation.
This struct tracks a "cursor" for appending display list entries using
the dl
method. Use dl_reset
to reset that cursor to the beginning of
display list memory, which you'll typically (but not necessarily) do after
writing REG_DLSWAP
to swap the display list double buffer. LowLevel
doesn't manage display list buffer swapping itself, only the cursor for
the next dl
call.
Implementations
impl<M: Model, I: Interface> LowLevel<M, I>
[src]
pub fn new(interface: I) -> Self
[src]
pub fn take_interface(self) -> I
[src]
Consumes the LowLevel
object and returns the interface it was
originally created with.
pub fn borrow_interface<'a>(&'a mut self) -> &'a mut I
[src]
pub fn wr8<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u8) -> Result<(), I>
[src]
pub fn wr16<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u16) -> Result<(), I>
[src]
pub fn wr32<R: HostAccessible>(&mut self, addr: Ptr<R>, v: u32) -> Result<(), I>
[src]
pub fn wr8s<R: HostAccessible>(
&mut self,
addr: Ptr<R>,
v: &[u8]
) -> Result<(), I>
[src]
&mut self,
addr: Ptr<R>,
v: &[u8]
) -> Result<(), I>
pub fn rd8<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u8, I>
[src]
pub fn rd16<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u16, I>
[src]
pub fn rd32<R: HostAccessible>(&mut self, addr: Ptr<R>) -> Result<u32, I>
[src]
pub fn rd8s<R: HostAccessible>(
&mut self,
addr: Ptr<R>,
into: &mut [u8]
) -> Result<(), I>
[src]
&mut self,
addr: Ptr<R>,
into: &mut [u8]
) -> Result<(), I>
pub fn main_mem_ptr(&self, offset: u32) -> Ptr<M::MainMem>
[src]
pub fn reg_ptr(&self, reg: Register) -> Ptr<M::RegisterMem>
[src]
pub fn host_command(&mut self, cmd: HostCmd, a0: u8, a1: u8) -> Result<(), I>
[src]
pub fn dl_reset(&mut self)
[src]
pub fn dl(&mut self, cmd: DLCmd) -> Result<(), I>
[src]
Trait Implementations
impl<M, I> Builder for LowLevel<M, I> where
M: Model,
I: Interface,
[src]
M: Model,
I: Interface,
type Error = Error<I>
type Model = M
fn append_raw_command(&mut self, raw: u32) -> Result<(), I>
[src]
fn append_command(&mut self, cmd: DLCmd) -> Result<(), I>
[src]
fn alpha_test(&mut self, func: TestFunc, ref_val: u8) -> Result<(), Self::Error>
[src]
fn begin(&mut self, prim: GraphicsPrimitive) -> Result<(), Self::Error>
[src]
fn bitmap_cell(&mut self, idx: u8) -> Result<(), Self::Error>
[src]
fn bitmap_ext_format(
&mut self,
format: BitmapExtFormat
) -> Result<(), Self::Error>
[src]
&mut self,
format: BitmapExtFormat
) -> Result<(), Self::Error>
fn bitmap_handle(&mut self, bmp: BitmapHandle) -> Result<(), Self::Error>
[src]
fn bitmap_layout_l(
&mut self,
format: BitmapFormat,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
[src]
&mut self,
format: BitmapFormat,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
fn bitmap_layout_h(
&mut self,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
[src]
&mut self,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
fn bitmap_layout(
&mut self,
format: BitmapFormat,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
[src]
&mut self,
format: BitmapFormat,
line_stride: u16,
height: u16
) -> Result<(), Self::Error>
fn bitmap_size_l(
&mut self,
width: u16,
height: u16,
filter: BitmapSizeFilter,
wrap_x: BitmapWrapMode,
wrap_y: BitmapWrapMode
) -> Result<(), Self::Error>
[src]
&mut self,
width: u16,
height: u16,
filter: BitmapSizeFilter,
wrap_x: BitmapWrapMode,
wrap_y: BitmapWrapMode
) -> Result<(), Self::Error>
fn bitmap_size_h(&mut self, width: u16, height: u16) -> Result<(), Self::Error>
[src]
fn bitmap_size(
&mut self,
width: u16,
height: u16,
filter: BitmapSizeFilter,
wrap_x: BitmapWrapMode,
wrap_y: BitmapWrapMode
) -> Result<(), Self::Error>
[src]
&mut self,
width: u16,
height: u16,
filter: BitmapSizeFilter,
wrap_x: BitmapWrapMode,
wrap_y: BitmapWrapMode
) -> Result<(), Self::Error>
fn bitmap_swizzle(&mut self, swizzle: BitmapSwizzle) -> Result<(), Self::Error>
[src]
fn bitmap_source(
&mut self,
ptr: Ptr<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
[src]
&mut self,
ptr: Ptr<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
fn bitmap_source_all(
&mut self,
bitmap: Bitmap<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
[src]
&mut self,
bitmap: Bitmap<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
fn bitmap_transform_a(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_b(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_c(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_d(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_e(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_f(
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
[src]
&mut self,
coeff: impl Into<MatrixCoeff>
) -> Result<(), Self::Error>
fn bitmap_transform_matrix(
&mut self,
matrix: impl Into<Matrix3x2>
) -> Result<(), Self::Error>
[src]
&mut self,
matrix: impl Into<Matrix3x2>
) -> Result<(), Self::Error>
fn blend_func(
&mut self,
src: BlendFunc,
dst: BlendFunc
) -> Result<(), Self::Error>
[src]
&mut self,
src: BlendFunc,
dst: BlendFunc
) -> Result<(), Self::Error>
fn call(
&mut self,
addr: Ptr<<Self::Model as Model>::DisplayListMem>
) -> Result<(), Self::Error>
[src]
&mut self,
addr: Ptr<<Self::Model as Model>::DisplayListMem>
) -> Result<(), Self::Error>
fn clear(
&mut self,
color: bool,
stencil: bool,
tag: bool
) -> Result<(), Self::Error>
[src]
&mut self,
color: bool,
stencil: bool,
tag: bool
) -> Result<(), Self::Error>
fn clear_all(&mut self) -> Result<(), Self::Error>
[src]
fn clear_color_rgb(&mut self, color: RGB) -> Result<(), Self::Error>
[src]
fn clear_color_alpha(&mut self, alpha: u8) -> Result<(), Self::Error>
[src]
fn clear_color_rgba(&mut self, color: RGBA) -> Result<(), Self::Error>
[src]
fn clear_stencil(&mut self, v: u8) -> Result<(), Self::Error>
[src]
fn clear_tag(&mut self, v: u8) -> Result<(), Self::Error>
[src]
fn color_rgb(&mut self, color: RGB) -> Result<(), Self::Error>
[src]
fn color_mask(&mut self, mask: ColorMask) -> Result<(), Self::Error>
[src]
fn color_alpha(&mut self, alpha: u8) -> Result<(), Self::Error>
[src]
fn display(&mut self) -> Result<(), Self::Error>
[src]
fn draw(
&mut self,
prim: GraphicsPrimitive,
f: impl FnOnce(VertexBuilder<'_, Self>) -> Result<(), Self::Error>
) -> Result<(), Self::Error>
[src]
&mut self,
prim: GraphicsPrimitive,
f: impl FnOnce(VertexBuilder<'_, Self>) -> Result<(), Self::Error>
) -> Result<(), Self::Error>
fn draw_iter(
&mut self,
prim: GraphicsPrimitive,
iter: impl Iterator<Item = Vertex2F>
) -> Result<(), Self::Error>
[src]
&mut self,
prim: GraphicsPrimitive,
iter: impl Iterator<Item = Vertex2F>
) -> Result<(), Self::Error>
fn end(&mut self) -> Result<(), Self::Error>
[src]
fn command_from_macro(&mut self, num: u8) -> Result<(), Self::Error>
[src]
fn jump(
&mut self,
addr: Ptr<<Self::Model as Model>::DisplayListMem>
) -> Result<(), Self::Error>
[src]
&mut self,
addr: Ptr<<Self::Model as Model>::DisplayListMem>
) -> Result<(), Self::Error>
fn line_width(&mut self, v: u16) -> Result<(), Self::Error>
[src]
fn nop(&mut self) -> Result<(), Self::Error>
[src]
fn palette_source(
&mut self,
ptr: Ptr<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
[src]
&mut self,
ptr: Ptr<<Self::Model as Model>::MainMem>
) -> Result<(), Self::Error>
fn point_size(&mut self, size: u16) -> Result<(), Self::Error>
[src]
fn restore_context(&mut self) -> Result<(), Self::Error>
[src]
fn return_from_call(&mut self) -> Result<(), Self::Error>
[src]
fn save_context(&mut self) -> Result<(), Self::Error>
[src]
fn scissor_size(&mut self, dims: (u16, u16)) -> Result<(), Self::Error>
[src]
fn scissor_pos(&mut self, pos: impl Into<ScissorPos>) -> Result<(), Self::Error>
[src]
fn scissor_rect(
&mut self,
rect: impl Into<ScissorRect>
) -> Result<(), Self::Error>
[src]
&mut self,
rect: impl Into<ScissorRect>
) -> Result<(), Self::Error>
fn stencil_test(
&mut self,
func: TestFunc,
ref_val: u8,
mask: u8
) -> Result<(), Self::Error>
[src]
&mut self,
func: TestFunc,
ref_val: u8,
mask: u8
) -> Result<(), Self::Error>
fn stencil_mask(&mut self, mask: u8) -> Result<(), Self::Error>
[src]
fn stencil_op(
&mut self,
fail: StencilOp,
pass: StencilOp
) -> Result<(), Self::Error>
[src]
&mut self,
fail: StencilOp,
pass: StencilOp
) -> Result<(), Self::Error>
fn tag(&mut self, v: u8) -> Result<(), Self::Error>
[src]
fn tag_mask(&mut self, update: bool) -> Result<(), Self::Error>
[src]
fn vertex_2f<Pos: Into<Vertex2F>>(
&mut self,
pos: Pos
) -> Result<(), Self::Error>
[src]
&mut self,
pos: Pos
) -> Result<(), Self::Error>
fn vertex_2ii<Pos: Into<Vertex2II>>(
&mut self,
pos: Pos
) -> Result<(), Self::Error>
[src]
&mut self,
pos: Pos
) -> Result<(), Self::Error>
fn vertex_format(&mut self, fmt: VertexFormat) -> Result<(), Self::Error>
[src]
fn vertex_translate_x(&mut self, v: i16) -> Result<(), Self::Error>
[src]
fn vertex_translate_y(&mut self, v: i16) -> Result<(), Self::Error>
[src]
fn vertex_translate(&mut self, offset: (i16, i16)) -> Result<(), Self::Error>
[src]
Auto Trait Implementations
impl<M, I> Send for LowLevel<M, I> where
I: Send,
M: Send,
<M as Model>::DisplayListMem: Send,
[src]
I: Send,
M: Send,
<M as Model>::DisplayListMem: Send,
impl<M, I> Sync for LowLevel<M, I> where
I: Sync,
M: Sync,
<M as Model>::DisplayListMem: Sync,
[src]
I: Sync,
M: Sync,
<M as Model>::DisplayListMem: Sync,
impl<M, I> Unpin for LowLevel<M, I> where
I: Unpin,
M: Unpin,
<M as Model>::DisplayListMem: Unpin,
[src]
I: Unpin,
M: Unpin,
<M as Model>::DisplayListMem: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,