diff options
| author | Juan Linietsky | 2014-05-04 22:50:23 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-05-04 22:50:23 -0300 |
| commit | 72ae89c5aa8da9110ec8f89e5558d5d04935f3b5 (patch) | |
| tree | 453b2c8b8cc0edc588cee2dd3e440b30ff729ae2 /drivers/gles1 | |
| parent | 3c17e0c91548299b60a6d3998eadb303418512cc (diff) | |
| download | godot-72ae89c5aa8da9110ec8f89e5558d5d04935f3b5.tar.gz godot-72ae89c5aa8da9110ec8f89e5558d5d04935f3b5.tar.zst godot-72ae89c5aa8da9110ec8f89e5558d5d04935f3b5.zip | |
Lots of 3D improvements:
-Object Manipulator Gizmo keeps proper scale in all windows and projections, (configurable on settings too).
-Manipulator gizmos for other objects (camera, shapes, etc) massively improved and bug-fixed.
-Manipulator gizmos are different for edited object and other objects.
-Properly highlight manipulator gizmo handles when hovered.
-Fixed bugs in fragment program when using more than 1 light together.
-Reload png/jpg files automatically in editor if edited externally.
-Added 4-stages Parallel Split Shadow Mapping, to improve shadow quality in large scenarios
-Added PCF13 to improve smoothness of shadow borders
-General optimization of directional light shadow mapping for Orthogonal,PSM and PSSM.
-Fixed normal mapping when importing DAE files, works nicely now.
Diffstat (limited to 'drivers/gles1')
| -rw-r--r-- | drivers/gles1/rasterizer_gles1.cpp | 21 | ||||
| -rw-r--r-- | drivers/gles1/rasterizer_gles1.h | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gles1/rasterizer_gles1.cpp b/drivers/gles1/rasterizer_gles1.cpp index 3ffebd470..60c88af50 100644 --- a/drivers/gles1/rasterizer_gles1.cpp +++ b/drivers/gles1/rasterizer_gles1.cpp @@ -1982,6 +1982,9 @@ AABB RasterizerGLES1::mesh_get_aabb(RID p_mesh) const { Mesh *mesh = mesh_owner.get( p_mesh ); ERR_FAIL_COND_V(!mesh,AABB()); + if (mesh->custom_aabb!=AABB()) + return mesh->custom_aabb; + AABB aabb; for (int i=0;i<mesh->surfaces.size();i++) { @@ -1995,6 +1998,24 @@ AABB RasterizerGLES1::mesh_get_aabb(RID p_mesh) const { return aabb; } +void RasterizerGLES1::mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb) { + + Mesh *mesh = mesh_owner.get( p_mesh ); + ERR_FAIL_COND(!mesh); + + mesh->custom_aabb=p_aabb; + +} + +AABB RasterizerGLES1::mesh_get_custom_aabb(RID p_mesh) const { + + const Mesh *mesh = mesh_owner.get( p_mesh ); + ERR_FAIL_COND_V(!mesh,AABB()); + + return mesh->custom_aabb; +} + + /* MULTIMESH API */ RID RasterizerGLES1::multimesh_create() { diff --git a/drivers/gles1/rasterizer_gles1.h b/drivers/gles1/rasterizer_gles1.h index e7e3200bb..dbb411c8a 100644 --- a/drivers/gles1/rasterizer_gles1.h +++ b/drivers/gles1/rasterizer_gles1.h @@ -323,6 +323,7 @@ class RasterizerGLES1 : public Rasterizer { Vector<Surface*> surfaces; int morph_target_count; VS::MorphTargetMode morph_target_mode; + AABB custom_aabb; mutable uint64_t last_pass; Mesh() { @@ -938,6 +939,9 @@ public: virtual AABB mesh_get_aabb(RID p_mesh) const; + virtual void mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb); + virtual AABB mesh_get_custom_aabb(RID p_mesh) const; + /* MULTIMESH API */ virtual RID multimesh_create(); |
