DiscussionsIssue archiveOCCT:Visualization

Archived issue #0028487

Visualization, TKOpenGl - add option for rendering with lower resolution

Open CASCADEOCCT:Visualizationclosed9 public notes

Search issues

Description

In some cases users have unbalanced configuration - high-resolution display (e.g. 4K) within slow low-end graphics. In these cases, rendering any complex scene with native resolution might be done with too low FPS and bad viewer interactivity, and this issue can not be negated by other rendering options (e.g. complexity of scene/geometry can not be reduced).

It is a common practice to reduce rendered image resolution at application side in case when hardware is not capable providing enough performance for rendering in full (native) resolution.

Of course, it is also possible changing display resolution system-wide (e.g. using up-scaling implementation provided by monitor or GPU driver), but it is not always desirable - e.g. when application works in windowed mode or it is desirable rendering user interface within native resolution while keeping 3D viewer with reduced resolution.

Therefore, it is proposed adding such option to OCCT 3D Viewer to cover such use cases.

Steps to reproduce

pload MODELING VISUALIZATION
box b 1 2 3
vclear
vinit View1
vdisplay b
vfit
vpoint p 0 0 0
vzbufftrihedron
vtrihedron tt

vrenderparams -rendScale 2

Public activity

9 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Thu Feb 23 20:50:42 2017 +0300

    0028487: Visualization, TKOpenGl - add option for rendering with lower resolution
    
    Graphic3d_RenderingParams::RenderResolutionScale - added new option
    defining scale factor for allocating off-screen rendering buffers
    relative to native resolution of window buffer.
    
    Scale factor can be below 1.0 (lower resolution) or higher (as analog of super sampling),
    but can not be combined with MSAA settings.
    
    Draw Harness command vrenderparams has been extended with option -rendScale
    managing introduced option Graphic3d_RenderingParams::RenderResolutionScale.
    
    vcaps has been extended with option -useWindowBuffer for managing
    OpenGl_Caps::useSystemBuffer option.
    
    vrepaint has been extended with option -immediate
    for testing immediate layer redraw
02Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Author
Patch is ready for review.
05Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
06Commenter 6
Branch CR28487 reviewed without remarks, ready for testing.
07Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
08Commenter 8
Dear Commenter 1,

Branch CR28487 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1213

Regressions/Differences:
Not detected

Testing cases:
v3d glsl rendscale - OK
http://occt-tests/CR28487-master-OCCT/Debian70-64/v3d/glsl/rendscale.html
http://occt-tests/CR28487-master-OCCT/Windows-64-VC10/v3d/glsl/rendscale.html

Testing on Linux:
Total MEMORY difference: 92367627 / 93207637 [-0.90%]
Total CPU difference: 19953.27000000024 / 19801.530000000217 [+0.77%]

Testing on Windows:
Total MEMORY difference: 57832494 / 57829936 [+0.00%]
Total CPU difference: 18621.823769898656 / 18793.846072598604 [-0.92%]
09Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records