--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoxelDemo", "VoxelDemo.vcproj", "{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Debug|Win32.Build.0 = Debug|Win32
+ {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Release|Win32.ActiveCfg = Release|Win32
+ {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoxelDemo", "VoxelDemo.vcproj", "{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Debug|Win32.ActiveCfg = Debug|Win32
- {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Debug|Win32.Build.0 = Debug|Win32
- {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Release|Win32.ActiveCfg = Release|Win32
- {EF9DFAE9-E10E-42D4-87D1-52431728AFDF}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8,00"
+ Version="9.00"
Name="VoxelDemo"
ProjectGUID="{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
RootNamespace="VoxelDemo"
Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="$(CSF_OPT_INC);.\inc"
+ AdditionalIncludeDirectories=".\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WNT"
MinimalRebuild="true"
BasicRuntimeChecks="3"
AdditionalLibraryDirectories="$(CSF_OPT_LIB32D)"
GenerateDebugInformation="true"
SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
<Tool
Name="VCAppVerifierTool"
/>
- <Tool
- Name="VCWebDeploymentTool"
- />
<Tool
Name="VCPostBuildEventTool"
/>
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
<Tool
Name="VCAppVerifierTool"
/>
- <Tool
- Name="VCWebDeploymentTool"
- />
<Tool
Name="VCPostBuildEventTool"
/>
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp"
+ CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp
"
Outputs="moc\moc_$(InputName).cpp"
/>
</FileConfiguration>
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp"
+ CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp
"
Outputs="moc\moc_$(InputName).cpp"
/>
</FileConfiguration>
#include <QWidget.h>
#include <AIS_InteractiveContext.hxx>
+#include <OpenGl_GraphicDriver.hxx>
#include <V3d_View.hxx>
+#include <OpenGl_View.hxx>
#include <Voxel_Prs.hxx>
#include <Voxel_Selector.hxx>
Handle(AIS_InteractiveContext) getIC() const { return myIC; }
Handle(V3d_View) getView() const { return myView; }
+ Handle(OpenGl_GraphicDriver) getGraphicDriver() const { return myGraphicDriver; }
Voxel_Selector& getSelector() { return mySelector; }
void setPrs(const Handle(Voxel_Prs)& prs) { myPrs = prs; }
virtual QPaintEngine* paintEngine() const;
private:
Handle(AIS_InteractiveContext) myIC;
Handle(V3d_View) myView;
+ Handle(OpenGl_GraphicDriver) myGraphicDriver;
bool myRotate;
bool myZoom;
#include "Voxel_VisData.h"
#include <Graphic3d_CBounds.hxx>
+class Handle(OpenGl_GraphicDriver);
+
class VoxelClient_VisDrawer
{
public:
public:
- Standard_EXPORT static void Init();
+ Standard_EXPORT static void Init (Handle(OpenGl_GraphicDriver)& theDriver);
Standard_EXPORT VoxelClient_VisDrawer(Voxel_VisData* theData);
Standard_EXPORT virtual ~VoxelClient_VisDrawer();
-set CASROOT=D:\OCC653\ros
-set QTDIR=D:\qt\4.8.2
-set PATH=%QTDIR%\bin;%PATH%
+call ../../../env.bat %1 %2 %3
-call %CASROOT%/env.bat %1 %2 %3
-call %CASROOT%/msvc.bat %1 %2 %3 VoxelDemo.sln
+if not ["%CASDEB%"] == [""] call ../../../msvc.bat %VCVER% win%ARCH% %CASDEB% VoxelDemo-%VCVER%.sln
+if ["%CASDEB%"] == [""] call ../../../msvc.bat %VCVER% win%ARCH% "" VoxelDemo-%VCVER%.sln
\ No newline at end of file
--- /dev/null
+call ../../../env.bat %1 %2 %3
+
+IF not "%CASDEB%" EQU "" (
+SET BIN_DIR=Debug
+) ELSE (
+SET BIN_DIR=Release
+)
+
+if not exist "%BIN_DIR%\VoxelDemo.exe" goto ERR_EXE
+
+echo Starting VoxelDemo .....
+start /D "%BIN_DIR%" VoxelDemo.exe
+
+goto END
+
+:ERR_EXE
+echo Executable %BIN_DIR%\VoxelDemo.exe not found."
+echo Probably you didn't compile the application.
+pause
+goto END
+
+:END
\ No newline at end of file
myDisplayedZMin = -DBL_MAX;
myDisplayedZMax = DBL_MAX;
- VoxelClient_VisDrawer::Init();
+ VoxelClient_VisDrawer::Init(myViewer->getGraphicDriver());
resize( 450, 600 );
}
Viewer::Viewer(QWidget* parent):QWidget(parent)
{
if(device.IsNull())
+ {
device = new Graphic3d_WNTGraphicDevice();
+ if (!device->GraphicDriver().IsNull())
+ {
+ myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(device->GraphicDriver());
+ }
+ }
- Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
+ Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
1000, V3d_XposYnegZpos,
Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
true, true, V3d_TEX_NONE);
#include <InterfaceGraphic_telem.hxx>
#include <OpenGl_Element.hxx>
-#include <OpenGl_Callback.hxx>
+#include <OpenGl_GraphicDriver.hxx>
#include <OpenGl_NamedStatus.hxx>
#include <GL/gl.h>
void Render (const Handle(OpenGl_Workspace) &theWorkspace) const;
+ virtual void Release (const Handle(OpenGl_Context)& theContext)
+ {
+ //
+ }
+
private:
VoxelClient_VisDrawer* myHandler;
}
/**************************************************************************/
-void VoxelClient_VisDrawer::Init()
+void VoxelClient_VisDrawer::Init (Handle(OpenGl_GraphicDriver)& theDriver)
{
static Standard_Boolean isInitializeded(Standard_False);
if (!isInitializeded)
{
isInitializeded = Standard_True;
-
- OpenGl_UserDrawCallback& aCallback = UserDrawCallback ();
- aCallback = VisDrawerCallBack;
+ theDriver->UserDrawCallback() = VisDrawerCallBack;
}
}