1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/v3d/bugs/bug1174
kgv 0d828ac838 0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.
2021-03-25 19:14:33 +03:00

69 lines
1.4 KiB
Plaintext

puts "================"
puts "OCC1174: Impossible to set different properties for different sides of a (sur)face"
puts "================"
puts ""
pload MODELING VISUALIZATION QAcommands
set x 200
set y 200
set Black_R 0
set Black_G 0
set Black_B 0
restore [locate_data_file OCC1174.brep] a
vinit View1
OCC1174_1 a
vdisplay a
vfit
set scale 2.50501
set proj_X 0.672033
set proj_Y -0.721033
set proj_Z 0.168771
set up_X -0.131494
set up_Y 0.108095
set up_Z 0.985406
set at_X 102.061817325836
set at_Y 169.436979868935
set at_Z 70.7572056943368
vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
set x_GREEN 300
set y_GREEN 180
set x_BLUE 180
set y_BLUE 250
set ColorList1 [vreadpixel ${x_GREEN} ${y_GREEN} rgb]
set RED_1 [lindex $ColorList1 0]
set GREEN_1 [lindex $ColorList1 1]
set BLUE_1 [lindex $ColorList1 2]
set ColorList2 [vreadpixel ${x_BLUE} ${y_BLUE} rgb]
set RED_2 [lindex $ColorList2 0]
set GREEN_2 [lindex $ColorList2 1]
set BLUE_2 [lindex $ColorList2 2]
if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} {
set IsGreen 1
} else {
set IsGreen 0
}
if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} {
set IsBlue 1
} else {
set IsBlue 0
}
if {${IsGreen} == 1 && ${IsBlue} == 1} {
puts "OCC1174: OK"
} else {
puts "OCC1174: Error"
}
vdump $imagedir/${casename}.png