mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +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.
40 lines
952 B
Plaintext
40 lines
952 B
Plaintext
puts "========"
|
|
puts "Texture 2D transformation (presentation trsf)"
|
|
puts "========"
|
|
|
|
set aTexture [locate_data_file bug26122_texture_trsf_ref.png]
|
|
pload MODELING VISUALIZATION
|
|
box b 1 1 1
|
|
explode b F
|
|
|
|
for { set aPass 0 } { $aPass < 2 } { incr aPass } {
|
|
vclear
|
|
vclose ALL
|
|
|
|
set aSuffix ""
|
|
if { $aPass == 0 } {
|
|
set aSuffix "ffp"
|
|
vcaps -ffp 1
|
|
} else {
|
|
set aSuffix "glsl"
|
|
vcaps -ffp 0
|
|
}
|
|
|
|
vinit View1 w=512 h=512
|
|
vtop
|
|
vdisplay -dispMode 1 b_6
|
|
vfit
|
|
|
|
vtexture b_6 $aTexture -modulate off
|
|
vdump $::imagedir/${::casename}_identity_${aSuffix}.png
|
|
|
|
vtexture b_6 $aTexture -trsfTranslate 0.0 0.0 -trsfScale 0.8 2.0
|
|
vdump $::imagedir/${::casename}_scale_${aSuffix}.png
|
|
|
|
vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.0 1.0
|
|
vdump $::imagedir/${::casename}_translate_${aSuffix}.png
|
|
|
|
vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.1 0.8
|
|
vdump $::imagedir/${::casename}_${aSuffix}.png
|
|
}
|