diff options
author | Daniel Rakos <daniel.rakos@rastergrid.com> | 2019-03-03 16:38:29 +0100 |
---|---|---|
committer | Daniel Rakos <daniel.rakos@rastergrid.com> | 2019-03-03 16:40:48 +0100 |
commit | 582f62c2b2cfa35794fe2886eab6579ffb7938f6 (patch) | |
tree | 7ae78eaf282987ab2e203310f8e5e7f4cfed4389 /servers | |
parent | 2f32a75d2e2afc22e7e170c2506455010d063ce8 (diff) |
Fixed TextureArray and Texture3D issues
- Texture arrays and 3D textures weren't working previously due to an
incorrect number of calls to glTexImage3D with incorrect level parameters.
This change fixes that.
- Fixed the incorrect calculation of the byte size of layered textures.
- Added the layer count to the debugger info when viewing video memory usage.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/register_server_types.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 922f017d0b..0cc1cc119c 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -73,7 +73,11 @@ static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsag usage.vram = E->get().bytes; usage.id = E->get().texture; usage.type = "Texture"; - usage.format = itos(E->get().width) + "x" + itos(E->get().height) + " " + Image::get_format_name(E->get().format); + if (E->get().depth == 0) { + usage.format = itos(E->get().width) + "x" + itos(E->get().height) + " " + Image::get_format_name(E->get().format); + } else { + usage.format = itos(E->get().width) + "x" + itos(E->get().height) + "x" + itos(E->get().depth) + " " + Image::get_format_name(E->get().format); + } r_usage->push_back(usage); } } |