mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
GraphicsServer::create_cube_render_target
This commit is contained in:
@@ -179,7 +179,20 @@ pub trait GraphicsServer: GraphicsServerAsAny {
|
||||
self.create_texture(GpuTextureDescriptor {
|
||||
kind: GpuTextureKind::Rectangle { width, height },
|
||||
pixel_kind,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
/// A shortcut for [`Self::create_texture`], that creates a cube texture with the given
|
||||
/// size and pixel kind.
|
||||
fn create_cube_render_target(
|
||||
&self,
|
||||
pixel_kind: PixelKind,
|
||||
size: usize,
|
||||
) -> Result<GpuTexture, FrameworkError> {
|
||||
self.create_texture(GpuTextureDescriptor {
|
||||
kind: GpuTextureKind::Cube { size },
|
||||
pixel_kind,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user