From 9ce57050a5d12776deedd44fcb82dd5841a56686 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 7 Nov 2022 22:40:03 -0800 Subject: Add GPUParticles to the OpenGL3 renderer. This includes collision (2D SDF, Box, Sphere, Heightmap), attraction (Box, Sphere), and all sorting modes. This does not include 3D SDF collisions, trails, or manual emission. --- drivers/gles3/storage/mesh_storage.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gles3/storage/mesh_storage.h') diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h index a31db24f2d..1aef3cbf78 100644 --- a/drivers/gles3/storage/mesh_storage.h +++ b/drivers/gles3/storage/mesh_storage.h @@ -327,6 +327,7 @@ public: _FORCE_INLINE_ uint32_t mesh_surface_get_lod(void *p_surface, float p_model_scale, float p_distance_threshold, float p_mesh_lod_threshold, uint32_t &r_index_count) const { Mesh::Surface *s = reinterpret_cast(p_surface); + ERR_FAIL_COND_V(!s, 0); int32_t current_lod = -1; r_index_count = s->index_count; @@ -403,6 +404,8 @@ public: virtual void mesh_instance_check_for_update(RID p_mesh_instance) override; virtual void update_mesh_instances() override; + // TODO: considering hashing versions with multimesh buffer RID. + // Doing so would allow us to avoid specifying multimesh buffer pointers every frame and may improve performance. _FORCE_INLINE_ void mesh_instance_surface_get_vertex_arrays_and_format(RID p_mesh_instance, uint32_t p_surface_index, uint32_t p_input_mask, GLuint &r_vertex_array_gl) { MeshInstance *mi = mesh_instance_owner.get_or_null(p_mesh_instance); ERR_FAIL_COND(!mi); -- cgit v1.2.3