Skip to main content

NullRenderProvider

Struct NullRenderProvider 

Source
pub struct NullRenderProvider { /* private fields */ }
Expand description

A render provider that does nothing. Used for headless testing and as a default before a real renderer is configured.

Implementations§

Source§

impl NullRenderProvider

Source

pub fn new() -> Self

Create a new null render provider.

Trait Implementations§

Source§

impl Default for NullRenderProvider

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Provider for NullRenderProvider

Source§

fn name(&self) -> &str

Returns the human-readable name of this provider (e.g., “OpenGL”).
Source§

fn version(&self) -> &str

Returns the version string of this provider implementation.
Source§

fn capabilities(&self) -> Box<dyn Any>

Returns provider capabilities as a type-erased Any value. Read more
Source§

impl ProviderLifecycle for NullRenderProvider

Source§

fn init(&mut self) -> GoudResult<()>

Initialize the provider. Called once during engine startup. Read more
Source§

fn update(&mut self, _delta: f32) -> GoudResult<()>

Per-frame update. Called once per frame for providers that need it (e.g., physics stepping, audio streaming).
Source§

fn shutdown(&mut self)

Shut down the provider. Called once during engine teardown. Read more
Source§

impl RenderProvider for NullRenderProvider

Source§

fn render_capabilities(&self) -> &RenderCapabilities

Returns the typed render capabilities for this provider. Read more
Source§

fn begin_frame(&mut self) -> GoudResult<FrameContext>

Begin a new frame. Returns an opaque token consumed by end_frame.
Source§

fn end_frame(&mut self, _frame: FrameContext) -> GoudResult<()>

End the current frame and present. Consumes the frame token.
Source§

fn resize(&mut self, _width: u32, _height: u32) -> GoudResult<()>

Handle window/surface resize.
Source§

fn create_texture(&mut self, _desc: &TextureDesc) -> GoudResult<TextureHandle>

Create a texture from a descriptor.
Source§

fn destroy_texture(&mut self, _handle: TextureHandle)

Destroy a previously created texture.
Source§

fn create_buffer(&mut self, _desc: &BufferDesc) -> GoudResult<BufferHandle>

Create a GPU buffer from a descriptor.
Source§

fn destroy_buffer(&mut self, _handle: BufferHandle)

Destroy a previously created buffer.
Source§

fn create_shader(&mut self, _desc: &ShaderDesc) -> GoudResult<ShaderHandle>

Compile and create a shader from a descriptor.
Source§

fn destroy_shader(&mut self, _handle: ShaderHandle)

Destroy a previously created shader.
Source§

fn create_pipeline( &mut self, _desc: &PipelineDesc, ) -> GoudResult<PipelineHandle>

Create a render pipeline from a descriptor.
Source§

fn destroy_pipeline(&mut self, _handle: PipelineHandle)

Destroy a previously created pipeline.
Source§

fn create_render_target( &mut self, _desc: &RenderTargetDesc, ) -> GoudResult<RenderTargetHandle>

Create a render target (framebuffer) from a descriptor.
Source§

fn destroy_render_target(&mut self, _handle: RenderTargetHandle)

Destroy a previously created render target.
Source§

fn draw(&mut self, _cmd: &DrawCommand) -> GoudResult<()>

Submit a single draw command.
Source§

fn draw_batch(&mut self, _cmds: &[DrawCommand]) -> GoudResult<()>

Submit a batch of draw commands.
Source§

fn draw_mesh(&mut self, _cmd: &MeshDrawCommand) -> GoudResult<()>

Submit a 3D mesh draw command.
Source§

fn draw_text(&mut self, _cmd: &TextDrawCommand) -> GoudResult<()>

Submit a text draw command.
Source§

fn draw_particles(&mut self, _cmd: &ParticleDrawCommand) -> GoudResult<()>

Submit a particle system draw command.
Source§

fn set_viewport(&mut self, _x: i32, _y: i32, _width: u32, _height: u32)

Set the viewport rectangle.
Source§

fn set_camera(&mut self, _camera: &CameraData)

Set the active camera data (view + projection matrices).
Source§

fn set_render_target(&mut self, _handle: Option<RenderTargetHandle>)

Set the active render target. None renders to the default framebuffer.
Source§

fn clear(&mut self, _color: [f32; 4])

Clear the current render target with the given color [r, g, b, a].

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> Event for T
where T: Send + Sync + 'static,

Source§

impl<T> Resource for T
where T: Send + Sync + 'static,