Skip to content

Improve rendering perfomance with caching - #29

Merged
Dream-Master merged 3 commits into
GTNewHorizons:masterfrom
Simolater:master
Oct 30, 2026
Merged

Dream-Master merged 3 commits into
GTNewHorizons:masterfrom
Simolater:master

Conversation

@Simolater

@Simolater Simolater commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

This PR fixes performance issues with rendering stargates. It is already noticable with a few gates and when rendering hundrets of gates the game becomes unplayable. With my propsed changes I was able to render 576 gates without any noticable impact on performance.

The improvement comes form generating the verticies only once on first render and caching them in display lists. Before these were generated and allocated on every frame. Furthermore, I moved texture ressource and a float buffer allocation out of the functions into static.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Dream-Master
Dream-Master merged commit df7cd0c into GTNewHorizons:master Oct 30, 2026
1 check passed
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.

3 participants