summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_canvas_gles2.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-06-10 12:38:51 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 11:53:26 +0100
commit4f163972bbd9c7379b01a1f9aa5310646ca7865e (patch)
tree3bbf4693663d8fc071912c114af782736ea17168 /drivers/gles2/rasterizer_canvas_gles2.cpp
parent1522d8c3ee6ddf43267f124940f4e43612058407 (diff)
Refactored RID/RID_Owner to always use O(1) allocation.
* Implements a growing chunked allocator * Removed redudant methods get and getptr, only getornull is supported now.
Diffstat (limited to 'drivers/gles2/rasterizer_canvas_gles2.cpp')
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp
index 373d3989ce..bdbe24524d 100644
--- a/drivers/gles2/rasterizer_canvas_gles2.cpp
+++ b/drivers/gles2/rasterizer_canvas_gles2.cpp
@@ -88,7 +88,7 @@ void RasterizerCanvasGLES2::_set_uniforms() {
state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_OUTSIDE_ALPHA, light->mode == VS::CANVAS_LIGHT_MODE_MASK ? 1.0 : 0.0);
if (state.using_shadow) {
- RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(light->shadow_buffer);
+ RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.getornull(light->shadow_buffer);
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 5);
glBindTexture(GL_TEXTURE_2D, cls->distance);
state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_MATRIX, light->shadow_matrix_cache);
@@ -1480,7 +1480,7 @@ void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, cons
{
//skeleton handling
if (ci->skeleton.is_valid() && storage->skeleton_owner.owns(ci->skeleton)) {
- skeleton = storage->skeleton_owner.get(ci->skeleton);
+ skeleton = storage->skeleton_owner.getornull(ci->skeleton);
if (!skeleton->use_2d) {
skeleton = NULL;
} else {
@@ -1825,7 +1825,7 @@ void RasterizerCanvasGLES2::canvas_debug_viewport_shadows(Light *p_lights_with_s
void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache) {
- RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(p_buffer);
+ RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.getornull(p_buffer);
ERR_FAIL_COND(!cls);
glDisable(GL_BLEND);