OpenGl_Caps - flag ffpEnable is now initialized to false on desktop OpenGL.
OpenGl_Context::init() - now prints error if OpenGL version does not support GLSL
and switches OpenGl_Caps::ffpEnable to true.
update test cases
pntSpritesDisable (Standard_False),
keepArrayData (Standard_False),
#if !defined(GL_ES_VERSION_2_0)
- ffpEnable (Standard_True),
+ ffpEnable (Standard_False),
useSystemBuffer (Standard_False),
#else
ffpEnable (Standard_False),
myMaxMsaaSamples = 0;
ReadGlVersion (myGlVerMajor, myGlVerMinor);
myVendor = (const char* )::glGetString (GL_VENDOR);
+ if (!caps->ffpEnable
+ && !IsGlGreaterEqual (2, 0))
+ {
+ caps->ffpEnable = true;
+ TCollection_ExtendedString aMsg =
+ TCollection_ExtendedString("OpenGL driver is too old! Context info:\n")
+ + " Vendor: " + (const char* )::glGetString (GL_VENDOR) + "\n"
+ + " Renderer: " + (const char* )::glGetString (GL_RENDERER) + "\n"
+ + " Version: " + (const char* )::glGetString (GL_VERSION) + "\n"
+ + " Fallback using deprecated fixed-function pipeline.\n"
+ + " Visualization might work incorrectly.\n"
+ " Consider upgrading the graphics driver.";
+ PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, aMsg);
+ }
#if defined(GL_ES_VERSION_2_0)
(void )theIsCoreProfile;
+vcaps -ffp 1
vexport ${aFile} ${format}
vglinfo
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
file delete ${aFile}
}
+vcaps -ffp 1
vexport $aFile SVG
if { [file exists ${aFile}] } {
puts "OCC21450"
puts "============"
puts ""
-#vinit
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#
pload XSDRAW
vinit
file delete -force ${imagedir}/${test_image}.pdf
set aFile ${imagedir}/${test_image}.pdf
+vcaps -ffp 1
vexport ${aFile} PDF
if { [checkplatform -windows] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to PDF format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
file delete -force ${imagedir}/${test_image}.pdf
set aFile ${imagedir}/${test_image}.pdf
+vcaps -ffp 1
vexport ${aFile} PDF
if { [checkplatform -windows] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to PS format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
file delete -force ${imagedir}/${test_image}.ps
set aFile ${imagedir}/${test_image}.ps
+vcaps -ffp 1
vexport ${aFile} PS
if { [checkplatform -windows] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to EPS format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
file delete -force ${imagedir}/${test_image}.eps
set aFile ${imagedir}/${test_image}.eps
+vcaps -ffp 1
vexport ${aFile} EPS
if { [checkplatform -windows] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to TEX format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
set aFile $imagedir/${test_image}.tex
+vcaps -ffp 1
vexport ${aFile} TEX
if { [file exists ${aFile}] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to SVG format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
file delete -force ${imagedir}/${test_image}.svg
set aFile ${imagedir}/${test_image}.svg
+vcaps -ffp 1
vexport ${aFile} SVG
if { [checkplatform -windows] } {
puts "OCC21450"
puts "============"
puts ""
-#vexport
-#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
-#Testing export to PGF format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
file delete -force ${imagedir}/${test_image}.pgf
set aFile ${imagedir}/${test_image}.pgf
+vcaps -ffp 1
vexport ${aFile} PGF
if { [checkplatform -windows] } {
+++ /dev/null
-puts "============"
-puts "OCC22332"
-puts "============"
-puts ""
-
-######################################################
-#
-######################################################
-
-set BUGNUMBER OCC22332
-
-vinit
-vclear
-box b 100 100 100
-vsetdispmode b 1
-vdisplay b
-vtrihedron tri
-vfit
-
-vmoveto 0 0
-
-# TEST LINEWIDTH
-# draw a 10px horizontal line at (10,10) - (400,10)
-vlayerline 10 10 400 10 10
-
-checkcolor 15 5 1 0 0
-checkcolor 15 13 1 0 0
-checkcolor 15 14 0 0 0
-
-# TEST LINETYPE
-# draw a slashed 10px horizontal line at (10,10) - (400,10)
-vlayerline 10 10 400 10 10 1
-
-checkcolor 23 10 1 0 0
-checkcolor 25 10 1 0 0
-checkcolor 26 10 0 0 0
-checkcolor 30 10 0 0 0
-checkcolor 32 10 1 0 0
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
set BugNumber OCC22368
+# enable FFP until bug-fix for GLSL
+vcaps -ffp 1
+
vinit
vtrihedron trihedron
OCC74_set trihedron 3
set BugNumber OCC22796
+vcaps -ffp 1
vinit
vdrawtext text0 "TestString\nHello,\tWorld!" -pos 0 0 0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
vexport $imagedir/${test_image}.pdf PDF
vaspects -setwidth 5
if { "[vreadpixel 183 190 rgb name]" != "RED"
- || "[vreadpixel 292 358 rgb name]" != "RED"
- || "[vreadpixel 26 265 rgb name]" != "RED"
+ || "[vreadpixel 314 344 rgb name]" != "RED"
+ || "[vreadpixel 26 267 rgb name]" != "RED"
} {
puts "Error : Boundary of face is not changed"
}
puts "============"
puts ""
+# enable FFP until bug-fix for GLSL
+vcaps -ffp 1
+
vinit
vclear
vaxo
set x3_coord 73
set y3_coord 150
+# enable FFP until bug-fix for GLSL
+vcaps -ffp 1
+
vinit
box b1 0 0 0 10 10 10
box b2 30 0 0 10 40 10
vtop
vfit
-checkcolor 100 200 0 0.5804 0.949
-
-if { $stat != 1 } {
- puts "Error : the 1D texture color does not match at px (100, 200)!"
+set aColor [vreadpixel 100 200 rgb name]
+if { "$aColor" != "CYAN1" } {
+ puts "Error: the 1D texture color does not match at px (100, 200)!"
}
-checkcolor 300 200 0.298 1.0 0.0
-
-if { $stat != 1 } {
- puts "Error : the 1D texture color does not match at px (300, 200)!"
+set aColor [vreadpixel 300 200 rgb name]
+if { "$aColor" != "CHARTREUSE" } {
+ puts "Error: the 1D texture color does not match at px (300, 200)!"
}
vactivate $aV2
vtop
vfit
-checkcolor 200 100 0 0.5804 0.949
-
-if { $stat != 1 } {
- puts "Error : the 2D texture color does not match at px (200, 100)!"
+set aColor [vreadpixel 100 200 rgb name]
+if { "$aColor" != "DARKGOLDENROD1" } {
+ puts "Error: the 2D texture color does not match at px (200, 100)!"
}
-checkcolor 200 300 0.298 1.0 0.0
-
-if { $stat != 1 } {
- puts "Error : the 2D texture color does not match at px (200, 300)!"
+set aColor [vreadpixel 200 300 rgb name]
+if { "$aColor" != "CHARTREUSE" } {
+ puts "Error: the 2D texture color does not match at px (200, 300)!"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
# Test image dumping with software accelerated GL context
############################################################
-vcaps -softMode
+vcaps -softMode 1 -ffp 1
vinit View1
box b 1 2 3
set anImage $imagedir/${casename}.png
+# enable FFP until bug-fix for GLSL
+vcaps -ffp 1
+
vinit View1
psphere s 10
vdisplay s
set anImage3 $imagedir/${casename}_3.png
set anImage4 $imagedir/${casename}_4.png
+# enable FFP until bug-fix for GLSL
+vcaps -ffp 1
+
vinit View1
psphere s 10
vdisplay s
+++ /dev/null
-puts "========="
-puts "CR25768"
-puts "========="
-puts ""
-###########################################################################################
-# Visualization, Graphic3d_Structure - do not use invalid bounding boxes of empty groups
-###########################################################################################
-box b 100 0 0 2 1 1
-vinit View1
-vclear
-vaxo
-vsetdispmode 0
-vdisplay b
-vfit
-vzoom 0.1
-vbounding b
-
-set x_coord 115
-set y_coord 153
-checkcolor $x_coord $y_coord 0 0 0
-
-if { $stat != 1 } {
- puts "Error: invalid broken bounding boxes"
-} else {
- puts "OK: valid boundong box"
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
source $env(CSF_OCCTSamplesPath)/tcl/dimensions.tcl
+vcaps -ffp 1
vdump $imagedir/${test_image}.png
puts "TEST COMPLETED"
incmesh s 0.01
# draw sphere
+vcaps -ffp 1
vinit View1
vclear
vsetdispmode 1