summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/storage/utilities.cpp')
-rw-r--r--drivers/gles3/storage/utilities.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gles3/storage/utilities.cpp b/drivers/gles3/storage/utilities.cpp
index a2d1ba376a..8e7e218bb9 100644
--- a/drivers/gles3/storage/utilities.cpp
+++ b/drivers/gles3/storage/utilities.cpp
@@ -71,6 +71,11 @@ Utilities::~Utilities() {
Vector<uint8_t> Utilities::buffer_get_data(GLenum p_target, GLuint p_buffer, uint32_t p_buffer_size) {
Vector<uint8_t> ret;
+
+ if (p_buffer_size == 0) {
+ return ret;
+ }
+
ret.resize(p_buffer_size);
glBindBuffer(p_target, p_buffer);
@@ -363,7 +368,7 @@ Size2i Utilities::get_maximum_viewport_size() const {
return Size2i();
}
- return Size2i(config->max_viewport_size, config->max_viewport_size);
+ return Size2i(config->max_viewport_size[0], config->max_viewport_size[1]);
}
#endif // GLES3_ENABLED