mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
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.
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
puts "========"
|
|
puts "0029283: Visualization - allow defining more than 8 light sources"
|
|
puts "Test case creates about 100 of light sources."
|
|
puts "========"
|
|
|
|
pload MODELING VISUALIZATION
|
|
|
|
vclear
|
|
vclose ALL
|
|
vinit View1
|
|
vcaps -ffp 0
|
|
vrenderparams -shadingModel phong
|
|
box b -50 5 -50 100 100 100
|
|
vdisplay -dispMode 1 b
|
|
vfront
|
|
vfit
|
|
|
|
# define lights
|
|
set THE_COLORS { RED1 YELLOW BLUE CYAN PURPLE WHITE HOTPINK GREEN MAGENTA MAGENTA3 }
|
|
vlight clear
|
|
set aNbColors 10
|
|
set aLightIndex 0
|
|
set aConstAtten 0.1
|
|
set aLinAtten 1
|
|
set aRand [expr srand(1)]
|
|
for { set anZIter -50 } { $anZIter <= 50 } { set anZIter [expr $anZIter + 10] } {
|
|
for { set anXIter -50 } { $anXIter <= 50 } { set anXIter [expr $anXIter + 10] } {
|
|
set anIndex [expr {int(rand() * $aNbColors)}]
|
|
set aColor [lindex $THE_COLORS $anIndex]
|
|
set aPos "$anXIter 0 $anZIter"
|
|
vlight -add positional -pos {*}$aPos -color $aColor -headLight 0 -constAttenuation $aConstAtten -linearAttenuation $aLinAtten
|
|
vpoint v${aLightIndex} {*}$aPos
|
|
set aLightIndex [expr $aLightIndex + 1]
|
|
}
|
|
}
|
|
vdump ${imagedir}/${casename}.png
|