Skip to content

Commit 97826b1

Browse files
utkarshayachitkwrobot
authored andcommitted
Merge topic 'volume_rendering_opengl2_fixes'
c7f6106 Removed unused file da53064 Another pass on disabling HAVS mapper dd24a4f OpenGL2 backend does not support HAVSMapper
2 parents 81f67da + c7f6106 commit 97826b1

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

ParaViewCore/ServerImplementation/Rendering/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ set (Module_SRCS
4040
vtkSICompositeOrthographicSliceRepresentationProxy.cxx
4141
)
4242

43+
# OpenGL2 specific definitions
44+
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
45+
add_definitions(-DVTKGL2)
46+
endif()
47+
4348
#------------------------------------------------------------------------------
4449
vtk_module_library(vtkPVServerImplementationRendering
4550
${Module_SRCS})

ParaViewCore/ServerImplementation/Rendering/vtkSIUnstructuredGridVolumeRepresentationProxy.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ void vtkSIUnstructuredGridVolumeRepresentationProxy::OnCreateVTKObjects()
4343
<< "Projected tetra"
4444
<< this->GetSubSIProxy("VolumePTMapper")->GetVTKObject()
4545
<< vtkClientServerStream::End;
46+
#ifndef VTKGL2
4647
stream << vtkClientServerStream::Invoke
4748
<< self
4849
<< "AddVolumeMapper"
4950
<< "HAVS"
5051
<< this->GetSubSIProxy("VolumeHAVSMapper")->GetVTKObject()
5152
<< vtkClientServerStream::End;
53+
#endif
5254
stream << vtkClientServerStream::Invoke
5355
<< self
5456
<< "AddVolumeMapper"
@@ -70,6 +72,7 @@ void vtkSIUnstructuredGridVolumeRepresentationProxy::OnCreateVTKObjects()
7072
void vtkSIUnstructuredGridVolumeRepresentationProxy::UpdateRenderViewExtensions(
7173
vtkSIViewProxy* view)
7274
{
75+
#ifndef VTKGL2
7376
vtkSIRenderViewProxy* rvp = vtkSIRenderViewProxy::SafeDownCast(view);
7477
if (!rvp)
7578
{
@@ -108,6 +111,7 @@ void vtkSIUnstructuredGridVolumeRepresentationProxy::UpdateRenderViewExtensions(
108111
this->SupportsHAVSMapper = 1;
109112
}
110113
}
114+
#endif
111115
this->RenderViewExtensionsTested = 1;
112116
}
113117
#endif

ParaViewCore/ServerManager/SMApplication/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ SET_SOURCE_FILES_PROPERTIES(
3737
ABSTRACT
3838
)
3939

40+
# OpenGL2 specific definitions
41+
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
42+
add_definitions(-DVTKGL2)
43+
endif()
44+
4045
vtk_module_library(vtkPVServerManagerApplication ${Module_SRCS})
4146

4247
#------------------------------------------------------------------------------

ParaViewCore/ServerManager/SMApplication/Resources/rendering.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@
134134
<Proxy class="vtkProjectedTetrahedraMapper"
135135
name="ProjectedTetrahedraMapper"
136136
processes="client|renderserver|dataserver"></Proxy>
137+
#ifndef VTKGL2
137138
<Proxy class="vtkHAVSVolumeMapper"
138139
name="HAVSVolumeMapper"
139140
processes="client|renderserver|dataserver"></Proxy>
141+
#endif
140142
<Proxy name="DummyVolumeMapper">
141143
<ProxyProperty command="SetRayCastFunction"
142144
name="RayCastFunction">

ParaViewCore/ServerManager/SMApplication/Resources/views_and_representations.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,9 @@
38853885
rendering.</Documentation>
38863886
<StringListDomain name="list">
38873887
<String value="Projected tetra" />
3888+
#ifndef VTKGL2
38883889
<String value="HAVS" />
3890+
#endif
38893891
<String value="Z sweep" />
38903892
<String value="Bunyk ray cast" />
38913893
</StringListDomain>
@@ -3928,12 +3930,14 @@
39283930
proxyname="ProjectedTetrahedraMapper"></Proxy>
39293931
<ShareProperties subproxy="VolumeDummyMapper"></ShareProperties>
39303932
</SubProxy>
3933+
#ifndef VTKGL2
39313934
<SubProxy>
39323935
<Proxy name="VolumeHAVSMapper"
39333936
proxygroup="mappers"
39343937
proxyname="HAVSVolumeMapper"></Proxy>
39353938
<ShareProperties subproxy="VolumeDummyMapper"></ShareProperties>
39363939
</SubProxy>
3940+
#endif
39373941
<!-- end of UnstructuredGridVolumeRepresentation -->
39383942
</RepresentationProxy>
39393943

0 commit comments

Comments
 (0)