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.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index b280898188..c4cfd1e765 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -1173,7 +1173,7 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, int p_layer)
glDeleteFramebuffers(1, &tmp_fbo);
}
- wb = PoolVector<uint8_t>::Write();
+ wb.release();
data.resize(data_size);
@@ -1248,7 +1248,7 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, int p_layer)
img_format = real_format;
}
- wb = PoolVector<uint8_t>::Write();
+ wb.release();
data.resize(data_size);
@@ -1316,7 +1316,7 @@ Ref<Image> RasterizerStorageGLES3::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);
@@ -2526,19 +2526,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
int v = value;
GLuint *gui = (GLuint *)data;
- gui[0] = v & 1 ? GL_TRUE : GL_FALSE;
- gui[1] = v & 2 ? GL_TRUE : GL_FALSE;
- gui[2] = v & 4 ? GL_TRUE : GL_FALSE;
+ gui[0] = (v & 1) ? GL_TRUE : GL_FALSE;
+ gui[1] = (v & 2) ? GL_TRUE : GL_FALSE;
+ gui[2] = (v & 4) ? GL_TRUE : GL_FALSE;
} break;
case ShaderLanguage::TYPE_BVEC4: {
int v = value;
GLuint *gui = (GLuint *)data;
- gui[0] = v & 1 ? GL_TRUE : GL_FALSE;
- gui[1] = v & 2 ? GL_TRUE : GL_FALSE;
- gui[2] = v & 4 ? GL_TRUE : GL_FALSE;
- gui[3] = v & 8 ? GL_TRUE : GL_FALSE;
+ gui[0] = (v & 1) ? GL_TRUE : GL_FALSE;
+ gui[1] = (v & 2) ? GL_TRUE : GL_FALSE;
+ gui[2] = (v & 4) ? GL_TRUE : GL_FALSE;
+ gui[3] = (v & 8) ? GL_TRUE : GL_FALSE;
} break;
case ShaderLanguage::TYPE_INT: {
@@ -3441,7 +3441,7 @@ void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
glGenBuffers(1, &surface->vertex_id);
glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
- glBufferData(GL_ARRAY_BUFFER, array_size, vr.ptr(), p_format & VS::ARRAY_FLAG_USE_DYNAMIC_UPDATE ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, array_size, vr.ptr(), (p_format & VS::ARRAY_FLAG_USE_DYNAMIC_UPDATE) ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
if (p_format & VS::ARRAY_FORMAT_INDEX) {
@@ -6337,7 +6337,7 @@ AABB RasterizerStorageGLES3::particles_get_current_aabb(RID p_particles) {
}
#if defined(GLES_OVER_GL) || defined(__EMSCRIPTEN__)
- r = PoolVector<uint8_t>::Read();
+ r.release();
vector = PoolVector<uint8_t>();
#else
glUnmapBuffer(GL_ARRAY_BUFFER);