Skip to content

Conversation

@dipts
Copy link
Contributor

@dipts dipts commented Dec 20, 2025

This new flag controls if a layer is rendered or skipped.

Being able to toggle the visibility of a layer is helpful for some use cases. In my specific case, the flag is needed to render a layer with highlightings in a separate FBO for use in a post-processing effect. This flag is used to turn off the layer in normal rendering and turn it on for single-layer rendering in a different FBO.

CLA-ID: 951

This new flag controls if a layer is rendered or skipped.
@dpasukhi dpasukhi requested a review from a team December 20, 2025 14:44
@dpasukhi dpasukhi added 2. Enhancement New feature or request 1. Visualization AIS cases, animation, ray-tracing, viewer integration into external software and etc... labels Dec 20, 2025
@dpasukhi dpasukhi added this to the Release 8.0 milestone Dec 20, 2025
@dpasukhi dpasukhi moved this from Todo to Review in Maintenance Dec 20, 2025
@github-project-automation github-project-automation bot moved this from Review to Integration in Maintenance Dec 22, 2025
- Introduced a new test file for Graphic3d_ZLayerSettings, covering default constructor behavior, visibility toggling, and JSON dumping functionality.
- Updated FILES.cmake to include the new test file.
@dpasukhi dpasukhi requested a review from Copilot December 22, 2025 19:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a visibility flag to Graphic3d_ZLayerSettings that controls whether a layer is rendered or skipped during the rendering process. This feature enables selective layer rendering, which is particularly useful for advanced rendering scenarios like rendering specific layers to separate framebuffer objects (FBOs) for post-processing effects.

Key Changes:

  • Added myVisible boolean field to Graphic3d_ZLayerSettings with corresponding getter/setter methods
  • Modified the layer iterator in OpenGl_LayerList to skip non-visible layers during rendering
  • Added comprehensive unit tests to validate the visibility flag behavior

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Visualization/TKService/Graphic3d/Graphic3d_ZLayerSettings.hxx Added visibility flag field, getter/setter methods, constructor initialization, and JSON dump support
src/Visualization/TKService/GTests/Graphic3d_ZLayerSettings_Test.cxx New comprehensive test suite covering visibility flag behavior, default settings, and JSON serialization
src/Visualization/TKService/GTests/FILES.cmake Registered the new test file in the build system
src/Visualization/TKOpenGl/OpenGl/OpenGl_LayerList.cxx Updated layer iteration logic to skip non-visible layers during rendering

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

Labels

1. Visualization AIS cases, animation, ray-tracing, viewer integration into external software and etc... 2. Enhancement New feature or request

Projects

Status: Integration

Development

Successfully merging this pull request may close these issues.

3 participants