summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_storage_gles2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2/rasterizer_storage_gles2.cpp')
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index b08202ae45..a0188da4f6 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -807,7 +807,7 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
}
}
- wb = PoolVector<uint8_t>::Write();
+ wb.release();
data.resize(data_size);
@@ -871,7 +871,7 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glDeleteFramebuffers(1, &temp_framebuffer);
- wb = PoolVector<uint8_t>::Write();
+ wb.release();
data.resize(data_size);
@@ -2155,8 +2155,8 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array,
dst_offset += dst_size[i];
}
- r = PoolVector<uint8_t>::Read();
- w = PoolVector<uint8_t>::Write();
+ r.release();
+ w.release();
return ret;
}
@@ -3976,20 +3976,19 @@ AABB RasterizerStorageGLES2::light_get_aabb(RID p_light) const {
float len = light->param[VS::LIGHT_PARAM_RANGE];
float size = Math::tan(Math::deg2rad(light->param[VS::LIGHT_PARAM_SPOT_ANGLE])) * len;
return AABB(Vector3(-size, -size, -len), Vector3(size * 2, size * 2, len));
- } break;
+ };
case VS::LIGHT_OMNI: {
float r = light->param[VS::LIGHT_PARAM_RANGE];
return AABB(-Vector3(r, r, r), Vector3(r, r, r) * 2);
- } break;
+ };
case VS::LIGHT_DIRECTIONAL: {
return AABB();
- } break;
+ };
}
ERR_FAIL_V(AABB());
- return AABB();
}
/* PROBE API */