Skip to content

[codex] optimize mesh submesh validation for static scenes#70

Draft
kitwongpixel wants to merge 1 commit into
openfl:masterfrom
kitwongpixel:codex/static-mesh-validation-opt
Draft

[codex] optimize mesh submesh validation for static scenes#70
kitwongpixel wants to merge 1 commit into
openfl:masterfrom
kitwongpixel:codex/static-mesh-validation-opt

Conversation

@kitwongpixel

Copy link
Copy Markdown

What changed

  • Avoid calling Geometry.validate() on every Mesh.subMeshes access unless the geometry is a PrimitiveBase that can actually rebuild itself lazily.
  • Keep the existing sub-mesh list behavior intact for normal geometries.

Why

Impact

  • Static meshes and ordinary loaded geometries avoid a redundant validate check every render loop iteration.
  • Primitive geometries still validate as needed, so primitives keep their existing lazy rebuild behavior.

Validation

  • git diff --check
  • Syntax reviewed manually in away3d/entities/Mesh.hx
  • I could not run Haxe/OpenFL compilation in this container because haxe is not installed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant