0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
[occt.git] / tests / v3d / glsl / phong_plastic
CommitLineData
64c759f8 1puts "========"
2puts "Per-pixel lighting using GLSL program (Phong shading), check plastic material"
3puts "========"
4
5# create box
6box b 1 2 3
7
8# draw box
64c759f8 9vclear
8e0a2b19 10vclose ALL
11vinit View1
64c759f8 12vsetdispmode 1
13vaxo
14vdisplay b
15vsetmaterial b PLASTIC
16vsetcolor b GREEN
17vfit
18vrotate 0.2 0.0 0.0
19
20# take snapshot with fixed pipeline
21vdump $::imagedir/${::casename}_OFF.png
22set aColorL [vreadpixel 150 250 rgb name]
23set aColorR [vreadpixel 250 250 rgb name]
24if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
25 puts "Error: wrong color (fixed pipeline)!"
26}
27
28vshaderprog b phong
29set aColorL [vreadpixel 150 250 rgb name]
30set aColorR [vreadpixel 250 250 rgb name]
31if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
32 puts "Error: wrong color (Phong shader)!"
33}