diff options
author | clayjohn <claynjohn@gmail.com> | 2022-11-07 22:40:03 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-11-14 23:28:25 -0800 |
commit | 9ce57050a5d12776deedd44fcb82dd5841a56686 (patch) | |
tree | a078f43091d787f0d985ee5c1a950fc0962eeaab /drivers/gles3/storage/mesh_storage.h | |
parent | 98e0d599529aee2b090d84acbd9aaa28572c0da8 (diff) |
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.
Diffstat (limited to 'drivers/gles3/storage/mesh_storage.h')
-rw-r--r-- | drivers/gles3/storage/mesh_storage.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<Mesh::Surface *>(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); |