Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Allow for multiple Panda3D renderers at the same time or sequentially #1524

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

SamFlt
Copy link
Contributor

@SamFlt SamFlt commented Dec 13, 2024

This PR allows the user to have multiple separate Panda3D renderers at the same time. A basic use case for this is to have a renderer for tracking, and another for augmented reality display.

This is done by through the following changes:

  • Use a single, static PandaFramework which manages the global Panda context. The framework is destroyed and closed at the end of the program. It is initialized when the first vpPanda3DBaseRenderer calls initFramework.
  • Each root renderer creates a new WindowFramework. A window framework can be used to create offscreen buffers and each framework has its own context through a GraphicsStateGuardian (GSG). All the offscreen buffers created from a single WindowFramework share the same GSG and calling renderFrame for a single GSG will render all offscreen buffers.
  • When calling renderFrame for a single vpPanda3DBaseRenderer, all the gsg that are not tied to this renderer are disabled. This means that the GPU does not have to rerender everything everytime, but renderFrame should be called for all separate renderers.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.84%. Comparing base (3e6bca2) to head (a0ba03b).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1524      +/-   ##
==========================================
- Coverage   53.85%   53.84%   -0.02%     
==========================================
  Files         442      441       -1     
  Lines       53867    53873       +6     
==========================================
- Hits        29010    29006       -4     
- Misses      24857    24867      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fspindle fspindle merged commit b0ac244 into lagadic:master Dec 17, 2024
76 of 78 checks 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.

2 participants