VTK
dox
Rendering
Core
vtkShaderDeviceAdapter2.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkShaderDeviceAdapter2.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
26
#ifndef vtkShaderDeviceAdapter2_h
27
#define vtkShaderDeviceAdapter2_h
28
29
#include "vtkRenderingCoreModule.h"
// For export macro
30
#include "
vtkObject.h
"
31
32
class
vtkShaderProgram2;
33
34
class
VTKRENDERINGCORE_EXPORT
vtkShaderDeviceAdapter2
:
public
vtkObject
35
{
36
public
:
37
vtkTypeMacro(
vtkShaderDeviceAdapter2
,
vtkObject
);
38
void
PrintSelf
(ostream &os,
vtkIndent
indent)
override
;
39
53
virtual
void
SendAttribute
(
const
char
* attrname,
int
components,
int
type
,
54
const
void
* attribute,
55
unsigned
long
offset
= 0) = 0;
56
61
void
SetShaderProgram
(vtkShaderProgram2* program)
62
{ this->
ShaderProgram
= program; }
63
vtkGetObjectMacro(
ShaderProgram
, vtkShaderProgram2)
64
65
// Description:
66
// This method is called before rendering. This gives the shader device
67
// adapter an opportunity to collect information, such as attribute indices
68
// that it will need while rendering.
69
virtual
void
PrepareForRender() = 0;
70
71
protected:
72
vtkShaderDeviceAdapter2
();
73
~
vtkShaderDeviceAdapter2
() override;
74
75
vtkShaderProgram2*
ShaderProgram
;
76
77
private:
78
vtkShaderDeviceAdapter2
(const
vtkShaderDeviceAdapter2
&) = delete;
79
void
operator=(const
vtkShaderDeviceAdapter2
&) = delete;
80
81
};
82
83
#endif
vtkShaderDeviceAdapter2::SetShaderProgram
void SetShaderProgram(vtkShaderProgram2 *program)
Set the shader program which is being updated by this device adapter.
Definition:
vtkShaderDeviceAdapter2.h:61
vtkShaderDeviceAdapter2
an adapter to pass generic vertex attributes to the rendering pipeline. .SECTION This class is an ada...
Definition:
vtkShaderDeviceAdapter2.h:35
vtkX3D::type
@ type
Definition:
vtkX3D.h:516
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:60
vtkShaderDeviceAdapter2::SendAttribute
virtual void SendAttribute(const char *attrname, int components, int type, const void *attribute, unsigned long offset=0)=0
Sends a single attribute to the graphics card.
vtkX3D::offset
@ offset
Definition:
vtkX3D.h:438
vtkShaderDeviceAdapter2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:40
vtkObject.h
vtkX3D::ShaderProgram
@ ShaderProgram
Definition:
vtkX3D.h:202
Generated by
1.8.18