From 1006ccf490c473447498a5c1a290e4dd9b55b7c2 Mon Sep 17 00:00:00 2001 From: quou Date: Mon, 6 Jan 2025 22:04:55 +1100 Subject: cubemap support --- video.hpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'video.hpp') diff --git a/video.hpp b/video.hpp index 52fffea..29c1445 100644 --- a/video.hpp +++ b/video.hpp @@ -335,7 +335,10 @@ enum Resource_State { struct Texture : public Asset { Texture_Id id; Texture_Format fmt; - int w, h; + int flags; + int w, h, d; + int mip_count, array_size; + int start_mip, start_array; bool alias; }; @@ -358,7 +361,9 @@ namespace Texture_Flags { colour_target = 1 << 1, depth_stencil_target = 1 << 2, copy_src = 1 << 3, - copy_dst = 1 << 4 + copy_dst = 1 << 4, + cubemap = 1 << 5, + swapchain = 1 << 6 }; }; @@ -456,8 +461,25 @@ struct Device { int flags, int w, int h, + int d, + int mip_count, + int array_size, Buffer_Id init ); + Texture_Id alias_texture( + Texture_Id o, + const char* name, + Texture_Format fmt, + int flags, + int w, + int h, + int d, + int mip_count, + int array_size, + int start_mip, + int start_array + ); + Texture_Id get_backbuffer(); Texture_Id get_depth_target(); Texture& get_texture(Texture_Id id); -- cgit v1.2.3-54-g00ecf