Rename Renderer to GraphicsBackend
This commit is contained in:
parent
4c2e0f889f
commit
55e56ffc6d
|
@ -6,7 +6,7 @@ use nix::c_void;
|
|||
use std::rc::Rc;
|
||||
|
||||
use backend::NewIdType;
|
||||
use backend::graphics::opengl::{Api, OpenglRenderer, PixelFormat, SwapBuffersError};
|
||||
use backend::graphics::opengl::{Api, OpenglGraphicsBackend, PixelFormat, SwapBuffersError};
|
||||
use backend::input::{InputBackend, InputHandler, Seat, KeyState, MouseButton, MouseButtonState, Axis, AxisSource, TouchEvent, TouchSlot};
|
||||
|
||||
/// Create a new `GlutinHeadlessRenderer` which implements the `OpenglRenderer` graphics
|
||||
|
@ -63,7 +63,7 @@ pub fn init_windowed_from_builder(builder: WindowBuilder) -> Result<(GlutinWindo
|
|||
))
|
||||
}
|
||||
|
||||
/// Headless Opengl Context created by `glutin`. Implements the `OpenglRenderer` graphics
|
||||
/// Headless Opengl Context created by `glutin`. Implements the `OpenglGraphicsBackend` graphics
|
||||
/// backend trait.
|
||||
pub struct GlutinHeadlessRenderer
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ impl GlutinHeadlessRenderer
|
|||
}
|
||||
}
|
||||
|
||||
impl OpenglRenderer for GlutinHeadlessRenderer
|
||||
impl OpenglGraphicsBackend for GlutinHeadlessRenderer
|
||||
{
|
||||
#[inline]
|
||||
fn swap_buffers(&self) -> Result<(), SwapBuffersError> {
|
||||
|
@ -124,7 +124,7 @@ impl OpenglRenderer for GlutinHeadlessRenderer
|
|||
}
|
||||
|
||||
/// Window with an active Opengl Context created by `glutin`. Implements the
|
||||
/// `OpenglRenderer` graphics backend trait.
|
||||
/// `OpenglGraphicsBackend` graphics backend trait.
|
||||
pub struct GlutinWindowedRenderer
|
||||
{
|
||||
window: Rc<Window>
|
||||
|
@ -139,7 +139,7 @@ impl GlutinWindowedRenderer
|
|||
}
|
||||
}
|
||||
|
||||
impl OpenglRenderer for GlutinWindowedRenderer
|
||||
impl OpenglGraphicsBackend for GlutinWindowedRenderer
|
||||
{
|
||||
#[inline]
|
||||
fn swap_buffers(&self) -> Result<(), SwapBuffersError> {
|
||||
|
|
|
@ -61,7 +61,7 @@ pub struct PixelFormat {
|
|||
|
||||
/// Trait that describes objects that have an OpenGl context
|
||||
/// and can be used to render upon
|
||||
pub trait OpenglRenderer
|
||||
pub trait OpenglGraphicsBackend
|
||||
{
|
||||
/// Swaps buffers at the end of a frame.
|
||||
fn swap_buffers(&self) -> Result<(), SwapBuffersError>;
|
||||
|
|
|
@ -4,7 +4,7 @@ use wayland_server::protocol::wl_shm::Format;
|
|||
use std::error::Error;
|
||||
|
||||
/// Trait that describes objects providing a software rendering implementation
|
||||
pub trait CpuRender<E: Error> {
|
||||
pub trait CpuGraphicsBackend<E: Error> {
|
||||
/// Render a given buffer of a given format at a specified place in the framebuffer
|
||||
///
|
||||
/// # Error
|
||||
|
|
Loading…
Reference in New Issue