1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/v3d/glsl/rendscale
kgv 56689b2700 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

OpenGl_View::blitBuffers() - eliminate compiler warning on Android
2017-03-03 16:11:22 +03:00

41 lines
874 B
Plaintext

puts "========"
puts "Rendering resolution scale factor"
puts "========"
set aFontFile ""
catch { set aFontFile [locate_data_file DejaVuSans.ttf] }
pload MODELING VISUALIZATION
set aLabelFont "Arial"
if { "$aFontFile" != "" } {
vfont add "$aFontFile" SansFont
set aLabelFont "SansFont"
}
box b 1 2 3
vclear
vinit View1
vdisplay b
vfit
vpoint p 0 0 0
vzbufftrihedron
vdrawtext t Text2d -font $aLabelFont
vtrihedron tt
vdisplay -trsfPers zoom -trsfPersPos 1 0 0 tt
text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
vdisplay ttl -2d topLeft -dispMode 1
vcolorscale cs -demo
vrenderparams -rendScale 1
vdump $::imagedir/${::casename}_100.png
vrenderparams -rendScale 0.5
vdump $::imagedir/${::casename}_050.png
vrenderparams -rendScale 0.75
vdump $::imagedir/${::casename}_075.png
vrenderparams -rendScale 2
vdump $::imagedir/${::casename}_200.png