Skip to content

Add engineSetRenderingListSize#4786

Open
FileEX wants to merge 3 commits intomultitheftauto:masterfrom
FileEX:feature/rendering-list-size
Open

Add engineSetRenderingListSize#4786
FileEX wants to merge 3 commits intomultitheftauto:masterfrom
FileEX:feature/rendering-list-size

Conversation

@FileEX
Copy link
Copy Markdown
Member

@FileEX FileEX commented Apr 9, 2026

Summary

By default, render lists have a fixed size, and for alphaEntitiesList it is 200 elements, and for underwater it is 100. These lists can be safely modified, so this PR adds the ability to change the size of such a list in order to avoid the issue encountered by the author of the referenced issue if necessary. If more objects are rendered than the list capacity, the oldest ones disappear randomly when moving the camera, and this is normal behavior.

nil engineSetRenderingListSize(string list, int count)
  • list - The list to be modified. It can be alpha or underwater.
  • count - The new size for the list. It cannot be smaller than the default size.
engineSetRenderingListSize("alpha", 1000)
image

Issues

For a large number of entities inside the list rendered simultaneously (> 3500), there are FPS drops. This is caused by O(n²) lists and may be fixed in a future PR.

Motivation

Fixes #4755

Test plan

Resource attached to the referenced issue.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX requested a review from a team as a code owner April 9, 2026 20:35
@FileEX FileEX added enhancement New feature or request bugfix Solution to a bug of any kind labels Apr 9, 2026
@Fernando-A-Rocha
Copy link
Copy Markdown
Contributor

Fernando-A-Rocha commented Apr 9, 2026

Wow so this fixes the limit of rendered objects that start disappearing when too many near you??!
It's a common issue when you load a map made for SAMP which sometimes has a huge amount of objects for decoration

@FileEX
Copy link
Copy Markdown
Member Author

FileEX commented Apr 9, 2026

Wow so this fixes the limit of rendered objects that start disappearing when too many near you??! It's a common issue when you load a map made for SAMP which sometimes has a huge amount of objects for decoration

Probably yes. Underwater entities and alpha entities are limited. Opaque entities have no quantity limit.

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

Labels

bugfix Solution to a bug of any kind enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undesired quantity limit for dxDrawModel3D when alphaTransparency is enabled on the model.

3 participants