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 // To switch off deprecated warning about
50 // vtkPainterDeviceAdapter::MakeVertexEmphasisWithStencilCheck
51 #if defined(_MSC_VER)
52 #pragma warning(push)
53 #pragma warning(disable:4996)
54 #endif
55 
56 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPainterDeviceAdapter :
58 {
59 public:
62  virtual void PrintSelf(ostream &os, vtkIndent indent);
63 
67  virtual void BeginPrimitive(int mode);
68 
72  virtual void EndPrimitive();
73 
78  virtual int IsAttributesSupported(int attribute);
79 
83  virtual void SendAttribute(int index, int components, int type,
84  const void *attribute, vtkIdType offset=0);
85 
89  virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute,
90  int idx, vtkIdType offset);
91 
96  virtual void SetAttributePointer(int index, int numcomponents, int type,
97  int stride, const void *pointer);
98 
100 
103  virtual void EnableAttributeArray(int index);
104  virtual void DisableAttributeArray(int index);
106 
110  virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count);
111 
115  virtual void DrawElements(int mode, vtkIdType count, int type, void *indices);
116 
120  virtual int Compatible(vtkRenderer *renderer);
121 
127  virtual void MakeVertexEmphasis(bool mode);
128 
130 
133  virtual void Stencil(int on);
134  virtual void WriteStencil(vtkIdType value);
135  virtual void TestStencil(vtkIdType value);
137 
138 protected:
141 
142  double PointSize;
143  double RangeNear;
144  double RangeFar;
147 private:
149  void operator=(const vtkOpenGLPainterDeviceAdapter &) VTK_DELETE_FUNCTION;
150 };
151 
152 #if defined(_MSC_VER)
153 #pragma warning(pop)
154 #endif
155 
156 #endif
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPainterDeviceAdapter::EnableAttributeArray
virtual void EnableAttributeArray(int index)=0
Enable/disable the attribute array set with SetAttributePointer.
vtkPainterDeviceAdapter
An adapter between a vtkPainter and a rendering device.
Definition: vtkPainterDeviceAdapter.h:55
vtkPainterDeviceAdapter::WriteStencil
virtual void WriteStencil(vtkIdType value)=0
vtkOpenGLPainterDeviceAdapter
An adapter between a vtkPainter and a rendering device.
Definition: vtkOpenGLPainterDeviceAdapter.h:56
vtkPainterDeviceAdapter::SendAttribute
virtual void SendAttribute(int index, int components, int type, const void *attribute, vtkIdType offset=0)=0
Sends a single attribute to the graphics card.
vtkPainterDeviceAdapter::IsAttributesSupported
virtual int IsAttributesSupported(int attribute)=0
Returns if the given attribute type is supported by the device.
vtkPainterDeviceAdapter::TestStencil
virtual void TestStencil(vtkIdType value)=0
vtkOpenGLPainterDeviceAdapter::RangeNear
double RangeNear
Definition: vtkOpenGLPainterDeviceAdapter.h:143
vtkPainterDeviceAdapter::New
static vtkPainterDeviceAdapter * New()
vtkPainterDeviceAdapter::SendMultiTextureCoords
virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute, int idx, vtkIdType offset)=0
Calls glMultiTex.
vtkPainterDeviceAdapter::Stencil
virtual void Stencil(int on)=0
Control use of the stencil buffer (for vertex selection).
vtkX3D::on
@ on
Definition: vtkX3D.h:439
vtkX3D::offset
@ offset
Definition: vtkX3D.h:438
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPainterDeviceAdapter::DisableAttributeArray
virtual void DisableAttributeArray(int index)=0
vtkPainterDeviceAdapter::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPainterDeviceAdapter::Compatible
virtual int Compatible(vtkRenderer *renderer)=0
Returns true if this device adapter is compatible with the given vtkRenderer.
vtkPainterDeviceAdapter::EndPrimitive
virtual void EndPrimitive()=0
Signals the end of sending a primitive to the graphics card.
vtkPainterDeviceAdapter::SetAttributePointer
void SetAttributePointer(int index, vtkDataArray *attributeArray)
Sets an array of attributes.
Definition: vtkPainterDeviceAdapter.h:200
vtkPainterDeviceAdapter::DrawElements
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.
vtkOpenGLPainterDeviceAdapter::Initialized
bool Initialized
Definition: vtkOpenGLPainterDeviceAdapter.h:146
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkOpenGLPainterDeviceAdapter::RangeFar
double RangeFar
Definition: vtkOpenGLPainterDeviceAdapter.h:144
vtkPainterDeviceAdapter::BeginPrimitive
virtual void BeginPrimitive(int mode)=0
Signals the start of sending a primitive to the graphics card.
vtkPainterDeviceAdapter.h
vtkX3D::mode
@ mode
Definition: vtkX3D.h:247
vtkPainterDeviceAdapter::DrawArrays
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.
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkPainterDeviceAdapter::MakeVertexEmphasis
virtual void MakeVertexEmphasis(bool mode)=0
Turns emphasis of vertices on or off for vertex selection.
vtkOpenGLPainterDeviceAdapter::PointSize
double PointSize
Definition: vtkOpenGLPainterDeviceAdapter.h:142
vtkOpenGLPainterDeviceAdapter::MaxStencil
int MaxStencil
Definition: vtkOpenGLPainterDeviceAdapter.h:145