summaryrefslogtreecommitdiff
path: root/servers/visual/rendering_device.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-08-26 17:43:58 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 12:01:05 +0100
commit2d6a916835bd851b2ea03a2e887ba83f0065dae4 (patch)
tree25542172b4275da52396b40033d8e77f7e2ce64c /servers/visual/rendering_device.h
parentf7aa7927e7268f7b9f99eed18e13dd04e25be8b2 (diff)
Environment sky more or less working.
Diffstat (limited to 'servers/visual/rendering_device.h')
-rw-r--r--servers/visual/rendering_device.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/servers/visual/rendering_device.h b/servers/visual/rendering_device.h
index 64c4f0f0c1..32d5520c0a 100644
--- a/servers/visual/rendering_device.h
+++ b/servers/visual/rendering_device.h
@@ -409,7 +409,13 @@ public:
virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >()) = 0;
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture) = 0;
- virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap) = 0;
+
+ enum TextureSliceType {
+ TEXTURE_SLICE_2D,
+ TEXTURE_SLICE_CUBEMAP
+ };
+
+ virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D) = 0;
virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls
virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush