projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d3e64e
)
0025217: Draw Harness - activate GLSL warnings output within command vgldebug
author
kgv
<kgv@opencascade.com>
Thu, 4 Sep 2014 11:30:58 +0000
(15:30 +0400)
committer
bugmaster
<bugmaster@opencascade.com>
Thu, 18 Sep 2014 11:27:58 +0000
(15:27 +0400)
src/ViewerTest/ViewerTest_ViewerCommands.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/ViewerTest/ViewerTest_ViewerCommands.cxx
b/src/ViewerTest/ViewerTest_ViewerCommands.cxx
index
30c0542
..
88d9866
100644
(file)
--- a/
src/ViewerTest/ViewerTest_ViewerCommands.cxx
+++ b/
src/ViewerTest/ViewerTest_ViewerCommands.cxx
@@
-4035,10
+4035,15
@@
static int VGlDebug (Draw_Interpretor& theDI,
Standard_Integer theArgNb,
const char** theArgVec)
{
Standard_Integer theArgNb,
const char** theArgVec)
{
+ Handle(OpenGl_GraphicDriver) aDriver;
+ Handle(V3d_View) aView = ViewerTest::CurrentView();
+ if (!aView.IsNull())
+ {
+ aDriver = Handle(OpenGl_GraphicDriver)::DownCast (aView->Viewer()->Driver());
+ }
if (theArgNb < 2)
{
if (theArgNb < 2)
{
- Handle(V3d_View) aView = ViewerTest::CurrentView();
- if (aView.IsNull())
+ if (aDriver.IsNull())
{
std::cerr << "No active view. Please call vinit.\n";
return 0;
{
std::cerr << "No active view. Please call vinit.\n";
return 0;
@@
-4051,7
+4056,15
@@
static int VGlDebug (Draw_Interpretor& theDI,
return 0;
}
return 0;
}
- ViewerTest_myDefaultCaps.contextDebug = Draw::Atoi (theArgVec[1]) != 0;
+ const Standard_Boolean toEnableDebug = Draw::Atoi (theArgVec[1]) != 0;
+ ViewerTest_myDefaultCaps.contextDebug = toEnableDebug;
+ ViewerTest_myDefaultCaps.glslWarnings = toEnableDebug;
+ if (aDriver.IsNull())
+ {
+ return 0;
+ }
+
+ aDriver->ChangeOptions().glslWarnings = toEnableDebug;
return 0;
}
return 0;
}