summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2017-05-20 10:09:36 +1000
committerBastiaanOlij <mux213@gmail.com>2017-05-20 10:09:36 +1000
commitc51ce72702ef58babe1ce3efd1c31206ba6721e2 (patch)
tree432eac4bab8f154453e12405b401aba0c9effac8 /drivers
parenta75623f436c215e107ede321afa08a1897552deb (diff)
Added texture_get_texid
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp8
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 7db2f23d47..8749021a12 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -970,6 +970,14 @@ Image::Format RasterizerStorageGLES3::texture_get_format(RID p_texture) const {
return texture->format;
}
+uint32_t RasterizerStorageGLES3::texture_get_texid(RID p_texture) const {
+
+ Texture *texture = texture_owner.get(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->tex_id;
+}
uint32_t RasterizerStorageGLES3::texture_get_width(RID p_texture) const {
Texture *texture = texture_owner.get(p_texture);
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index c700b7cb1c..7cae58852d 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -289,6 +289,7 @@ public:
virtual void texture_set_flags(RID p_texture, uint32_t p_flags);
virtual uint32_t texture_get_flags(RID p_texture) const;
virtual Image::Format texture_get_format(RID p_texture) const;
+ virtual uint32_t texture_get_texid(RID p_texture) const;
virtual uint32_t texture_get_width(RID p_texture) const;
virtual uint32_t texture_get_height(RID p_texture) const;
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height);