1
0
Fork 0
forked from wry/wry

render: implement a vulkan renderer

This commit is contained in:
Julian Orth 2024-02-03 15:19:20 +01:00
parent 4ba8550da8
commit cf332e8436
66 changed files with 4287 additions and 239 deletions

View file

@ -1,10 +1,12 @@
use {
crate::{
gfx_api::GfxTexture,
gfx_apis::gl::{gl::texture::GlTexture, renderer::context::GlRenderContext},
format::Format,
gfx_api::{GfxError, GfxTexture},
gfx_apis::gl::{gl::texture::GlTexture, renderer::context::GlRenderContext, RenderError},
},
std::{
any::Any,
cell::Cell,
fmt::{Debug, Formatter},
rc::Rc,
},
@ -39,4 +41,21 @@ impl GfxTexture for Texture {
fn as_any(&self) -> &dyn Any {
self
}
fn into_any(self: Rc<Self>) -> Rc<dyn Any> {
self
}
fn read_pixels(
self: Rc<Self>,
_x: i32,
_y: i32,
_width: i32,
_height: i32,
_stride: i32,
_format: &Format,
_shm: &[Cell<u8>],
) -> Result<(), GfxError> {
Err(RenderError::UnsupportedOperation.into())
}
}