VTK
vtkOpenGLPainterDeviceAdapter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLPainterDeviceAdapter.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 =========================================================================*/
15 /*
16  * Copyright 2004 Sandia Corporation.
17  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
18  * license for use of this work by or on behalf of the
19  * U.S. Government. Redistribution and use in source and binary forms, with
20  * or without modification, are permitted provided that this Notice and any
21  * statement of authorship are reproduced on all copies.
22  */
23 
43 #ifndef vtkOpenGLPainterDeviceAdapter_h
44 #define vtkOpenGLPainterDeviceAdapter_h
45 
46 #include "vtkRenderingOpenGLModule.h" // For export macro
48 
49 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPainterDeviceAdapter :
51 {
52 public:
55  void PrintSelf(ostream &os, vtkIndent indent) override;
56 
60  void BeginPrimitive(int mode) override;
61 
65  void EndPrimitive() override;
66 
71  int IsAttributesSupported(int attribute) override;
72 
76  void SendAttribute(int index, int components, int type,
77  const void *attribute, vtkIdType offset=0) override;
78 
82  void SendMultiTextureCoords(int numcomp, int type, const void *attribute,
83  int idx, vtkIdType offset) override;
84 
89  void SetAttributePointer(int index, int numcomponents, int type,
90  int stride, const void *pointer) override;
91 
93 
96  void EnableAttributeArray(int index) override;
97  void DisableAttributeArray(int index) override;
99 
103  void DrawArrays(int mode, vtkIdType first, vtkIdType count) override;
104 
108  void DrawElements(int mode, vtkIdType count, int type, void *indices) override;
109 
113  int Compatible(vtkRenderer *renderer) override;
114 
120  void MakeVertexEmphasis(bool mode) override;
121 
123 
126  void Stencil(int on) override;
127  void WriteStencil(vtkIdType value) override;
128  void TestStencil(vtkIdType value) override;
130 
131 protected:
133  ~vtkOpenGLPainterDeviceAdapter() override;
134 
135  double PointSize;
136  double RangeNear;
137  double RangeFar;
140 private:
142  void operator=(const vtkOpenGLPainterDeviceAdapter &) = delete;
143 };
144 
145 #endif
virtual void MakeVertexEmphasis(bool mode)=0
Turns emphasis of vertices on or off for vertex selection.
virtual void SendAttribute(int index, int components, int type, const void *attribute, vtkIdType offset=0)=0
Sends a single attribute to the graphics card.
virtual void EnableAttributeArray(int index)=0
Enable/disable the attribute array set with SetAttributePointer.
virtual void WriteStencil(vtkIdType value)=0
Control use of the stencil buffer (for vertex selection).
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:345
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkPainterDeviceAdapter * New()
virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute, int idx, vtkIdType offset)=0
Calls glMultiTex.
virtual void Stencil(int on)=0
Control use of the stencil buffer (for vertex selection).
virtual int IsAttributesSupported(int attribute)=0
Returns if the given attribute type is supported by the device.
virtual void TestStencil(vtkIdType value)=0
Control use of the stencil buffer (for vertex selection).
An adapter between a vtkPainter and a rendering device.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetAttributePointer(int index, vtkDataArray *attributeArray)
Sets an array of attributes.
virtual void DisableAttributeArray(int index)=0
Enable/disable the attribute array set with SetAttributePointer.
virtual int Compatible(vtkRenderer *renderer)=0
Returns true if this device adapter is compatible with the given vtkRenderer.
virtual void EndPrimitive()=0
Signals the end of sending a primitive to the graphics card.
virtual void DrawElements(int mode, vtkIdType count, int type, void *indices)=0
Send items in the attribute pointers to the graphics card to define a primitive.
An adapter between a vtkPainter and a rendering device.
virtual void BeginPrimitive(int mode)=0
Signals the start of sending a primitive to the graphics card.
virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count)=0
Send a section of the enabled attribute pointers to the graphics card to define a primitive...