Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkVtkShaderProgram.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkVtkShaderProgram.h"
18 
19 #include "vtkShader2.h"
20 
21 mitk::VtkShaderProgram::VtkShaderProgram() : m_VtkShaderProgram(NULL)
22 {
23 }
24 
26 {
27 }
28 
30 {
31  if (m_VtkShaderProgram)
32  {
33  m_VtkShaderProgram->Use();
34  }
35 }
36 
38 {
39  if (m_VtkShaderProgram)
40  {
41  m_VtkShaderProgram->Restore();
42  }
43 }
44 
45 void mitk::VtkShaderProgram::SetVtkShaderProgram(vtkSmartPointer<vtkShaderProgram2> p)
46 {
47  m_VtkShaderProgram = p;
48 }
49 
50 vtkSmartPointer<vtkShaderProgram2> mitk::VtkShaderProgram::GetVtkShaderProgram() const
51 {
52  return m_VtkShaderProgram;
53 }
54 
56 {
57  return m_ShaderTimestampUpdate;
58 }
virtual void Activate() override
virtual void Deactivate() override
itk::TimeStamp & GetShaderTimestampUpdate()
void SetVtkShaderProgram(vtkSmartPointer< vtkShaderProgram2 > p)
vtkSmartPointer< vtkShaderProgram2 > GetVtkShaderProgram() const