mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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.
44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
puts "========"
|
|
puts "Per-vertex lighting using built-in GLSL program, one positional light source."
|
|
puts "Visual comparison with the reference snapshot should be performed for this test case."
|
|
puts "========"
|
|
|
|
vclear
|
|
vclose ALL
|
|
vinit View1
|
|
|
|
# create objects
|
|
set anX 0.001
|
|
circle c 0 0 0 0.001
|
|
mkedge e c
|
|
wire w e
|
|
plane s
|
|
mkface f1 s w
|
|
mkface f2 s w
|
|
ttranslate f1 $anX -0.001 0
|
|
|
|
# display objects
|
|
vtop
|
|
vdisplay -dispMode 1 f1 f2
|
|
vsetlocation f2 $anX 0.001 0
|
|
vpoint vl $anX 0 0.001
|
|
vfit
|
|
|
|
# setup light
|
|
vcaps -ffp 0
|
|
vrenderparams -shadingModel vert
|
|
vlight clear
|
|
vlight add positional pos $anX 0 0.001 color RED1 headLight 0
|
|
|
|
set aColor1 [vreadpixel 205 180 rgb name]
|
|
set aColor2 [vreadpixel 205 210 rgb name]
|
|
if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
|
|
puts "Error: expected color near the light spot is RED"
|
|
}
|
|
|
|
set aColor3 [vreadpixel 205 100 rgb name]
|
|
set aColor4 [vreadpixel 205 306 rgb name]
|
|
if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
|
|
puts "Error: expected color far from the light spot is RED4"
|
|
}
|