summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_storage_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 8046a18f05..012cda953c 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -225,7 +225,7 @@ RID RasterizerStorageGLES3::canvas_light_shadow_buffer_create(int p_width) {
glGenRenderbuffers(1, &cls->depth);
glBindRenderbuffer(GL_RENDERBUFFER, cls->depth);
- glRenderbufferStorage(GL_RENDERBUFFER, config->depth_buffer_internalformat, cls->size, cls->height);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, cls->size, cls->height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, cls->depth);
glGenTextures(1, &cls->distance);
@@ -442,6 +442,10 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
}
bool RasterizerStorageGLES3::has_os_feature(const String &p_feature) const {
+ if (!config) {
+ return false;
+ }
+
if (p_feature == "rgtc") {
return config->rgtc_supported;
}
@@ -453,11 +457,8 @@ bool RasterizerStorageGLES3::has_os_feature(const String &p_feature) const {
if (p_feature == "bptc") {
return config->bptc_supported;
}
- if (p_feature == "etc") {
- return config->etc_supported;
- }
- if (p_feature == "etc2") {
+ if (p_feature == "etc" || p_feature == "etc2") {
return config->etc2_supported;
}
@@ -619,9 +620,6 @@ void RasterizerStorageGLES3::initialize() {
void RasterizerStorageGLES3::finalize() {
}
-void RasterizerStorageGLES3::_copy_screen() {
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-}
void RasterizerStorageGLES3::update_memory_info() {
}