mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
OpenGL rendering is now done into sRGB framebuffer. OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended by programs resolving MSAA texture and applying gamma correction as fallbacks. Quantity_Color definition has been modified to store RGB components in linear color space within Quantity_TOC_RGB type. Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly. New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space. OpenGl_TextureFormat class definition has been moved to dedicated files. New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat(). New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat() and OpenGl_FrameBuffer::getDepthDataFormat(). Graphic3d_TextureRoot::IsColorMap() - introduced new property defining if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures. OpenGl_Texture initialization methods have been extended with new theIsColorMap argument. vreadpixel - added argument -sRGB printing color in sRGB color space. Test cases have been updated to new sRGB rendered results.
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
puts "============"
|
|
puts "0026357: Visualization - Panning zooms view if aspect ratio > 1"
|
|
puts "============"
|
|
puts ""
|
|
|
|
box b 100 100 100
|
|
|
|
vclear
|
|
vinit View1 w=400 h=400
|
|
vinit View2 w=200 h=400
|
|
vinit View3 w=400 h=200
|
|
|
|
vdisplay -dispMode 1 -highMode 1 b
|
|
|
|
# Test panning with aspect ratio 1:1
|
|
vactivate View1
|
|
vaxo
|
|
vfit
|
|
vpan 200 0
|
|
vmoveto 399 200
|
|
if { [vreadpixel 399 200 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View1" }
|
|
vpan -200 0
|
|
vmoveto 200 200
|
|
if { [vreadpixel 200 200 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View1" }
|
|
vdump ${imagedir}/${casename}_1.png
|
|
|
|
# Test panning with aspect ratio 1:2
|
|
vactivate View2
|
|
vaxo
|
|
vfit
|
|
vpan 100 0
|
|
vmoveto 199 100
|
|
if { [vreadpixel 199 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View2" }
|
|
vpan -100 0
|
|
vmoveto 100 100
|
|
if { [vreadpixel 100 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View2" }
|
|
vdump ${imagedir}/${casename}_2.png
|
|
|
|
# Test panning with aspect ratio 2:1
|
|
vactivate View3
|
|
vaxo
|
|
vfit
|
|
vpan 200 0
|
|
vmoveto 399 100
|
|
if { [vreadpixel 399 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after forward panning in View3" }
|
|
vpan -200 0
|
|
vmoveto 200 100
|
|
if { [vreadpixel 200 100 rgb name] != "CYAN2" } { puts "Error: incorrect color after backward panning in View3" }
|
|
vdump ${imagedir}/${casename}_3.png
|