Protection against accessing null pointer is added in OpenGl_VertexBuffer::Create().
In command vreadpixel OpenGl-related warnings are redirected to cout so that they do not contaminate the command output.
Test grid caf presentation is configured to ignore OpenGl-related warning messages.
Tests in grid tools are configured to report status SKIPPED if tools are not available (OCCT is built without Qt).
// =======================================================================
bool OpenGl_VertexBuffer::Create (const Handle(OpenGl_Context)& theGlCtx)
{
- if (myBufferId == NO_BUFFER)
+ if (myBufferId == NO_BUFFER && theGlCtx->core15fwd != NULL)
{
theGlCtx->core15fwd->glGenBuffers (1, &myBufferId);
}
return 1;
}
+ // redirect possible warning messages that could have been added by ToPixMap
+ // into the Tcl interpretor (via DefaultMessenger) to cout, so that they do not
+ // contaminate result of the command
+ Standard_CString aWarnLog = theDI.Result();
+ if (aWarnLog != NULL && aWarnLog[0] != '\0')
+ {
+ std::cout << aWarnLog << std::endl;
+ }
+ theDI.Reset();
+
Quantity_ColorRGBA aColor = anImage.PixelColor (anX, anY);
if (toShowName)
{
vmoveto 0 0
if { [vreadpixel $x1 $y rgb name] != "IVORY" || [vreadpixel $x2 $y rgb name] != "IVORY" } {
- Error: unexpected color of not selected object
+ puts "Error: unexpected color of not selected object"
}
vmoveto ${x1} ${y}
vmoveto ${x1} ${y}
if { [vreadpixel $x1 $y rgb name] != "WHITE" } {
- Error: unexpected color of selected object
+ puts "Error: unexpected color of selected object"
}
if { [vreadpixel $x2 $y rgb name] != "IVORY" } {
- Error: unexpected color of not selected object
+ puts "Error: unexpected color of not selected object"
}
vmoveto ${x2} ${y}
vmoveto ${x2} ${y}
if { [vreadpixel $x1 $y rgb name] != "IVORY" } {
- Error: unexpected color of not selected object
+ puts "Error: unexpected color of not selected object"
}
if { [vreadpixel $x2 $y rgb name] != "WHITE" } {
- Error: unexpected color of selected object
+ puts "Error: unexpected color of selected object"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+IGNORE /on screen buffer is used for image dump - content might be invalid/ reported when software Microsoft OpenGL driver is used (remote desktop)
+IGNORE /^\s*DPrsStd_AISColor\s*:\s*Error\b/ ignore presentation K2 error message
FAILED /\binvalid\b/ error
FAILED /\bFailed\b/ error
FAILED /\bfailed\b/ error
-IGNORE /^\s*DPrsStd_AISColor\s*:\s*Error\b/ ignore presentation K2 error message
+SKIPPED /Draw_Failure: Could not open: TKToolsDraw/ OCCT built without Qt tools
FAILED /\bFaulty\b/ bad shape
OK /Relative error of mass computation/ message from vprops
\ No newline at end of file