mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-06 10:36:12 +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.
30 lines
761 B
Plaintext
30 lines
761 B
Plaintext
puts "========"
|
|
puts "Per-pixel lighting using GLSL program (Phong shading), check plastic material"
|
|
puts "========"
|
|
|
|
# create box
|
|
box b 1 2 3
|
|
|
|
# draw box
|
|
vclear
|
|
vclose ALL
|
|
vinit View1
|
|
vsetdispmode 1
|
|
vaxo
|
|
vdisplay b
|
|
vsetmaterial b PLASTIC
|
|
vsetcolor b GREEN
|
|
vfit
|
|
vrotate 0.2 0.0 0.0
|
|
|
|
# take snapshot with fixed pipeline
|
|
vdump $::imagedir/${::casename}_OFF.png
|
|
set aColorL [vreadpixel 150 250 rgb name]
|
|
set aColorR [vreadpixel 250 250 rgb name]
|
|
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (fixed pipeline)!" }
|
|
|
|
vshaderprog b phong
|
|
set aColorL [vreadpixel 150 250 rgb name]
|
|
set aColorR [vreadpixel 250 250 rgb name]
|
|
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (Phong shader)!" }
|