VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPainterDeviceAdapter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPainterDeviceAdapter.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 
46 #ifndef __vtkPainterDeviceAdapter_h
47 #define __vtkPainterDeviceAdapter_h
48 
49 #include "vtkRenderingCoreModule.h" // For export macro
50 #include "vtkObject.h"
51 #include "vtkDataArray.h" // needed for inline functions.
52 class vtkRenderer;
53 
55 {
56 public:
57  static vtkPainterDeviceAdapter* New();
59  virtual void PrintSelf(ostream &os, vtkIndent indent);
60 
69  virtual void BeginPrimitive(int mode) = 0;
70 
72  virtual void EndPrimitive() = 0;
73 
76  virtual int IsAttributesSupported(int attribute)=0;
77 
79 
80  virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute,
81  int idx, vtkIdType offset) = 0;
83 
85 
95  virtual void SendAttribute(int index, int components, int type,
96  const void *attribute, vtkIdType offset=0) = 0;
98 
104  void SetAttributePointer(int index, vtkDataArray *attributeArray);
105 
107 
116  virtual void SetAttributePointer(int index, int numcomponents, int type,
117  int stride, const void *pointer) = 0;
119 
121 
122  virtual void EnableAttributeArray(int index) = 0;
123  virtual void DisableAttributeArray(int index) = 0;
125 
135  virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count) = 0;
136 
138 
150  virtual void DrawElements(int mode, vtkIdType count, int type,
151  void *indices) = 0;
153 
156  virtual int Compatible(vtkRenderer *renderer) = 0;
157 
158 #ifndef VTK_LEGACY_REMOVE
159 
161  virtual void MakeLighting(int mode) = 0;
162 
165  virtual int QueryLighting() = 0;
166 
169  virtual void MakeMultisampling(int mode) = 0;
170 
173  virtual int QueryMultisampling() = 0;
174 
177  virtual void MakeBlending(int mode) = 0;
178 
180 
182  virtual int QueryBlending() = 0;
183 #endif
184 
185 
187  virtual void MakeVertexEmphasis(bool mode) = 0;
188 
190 
191  virtual void Stencil(int on) = 0;
192  virtual void WriteStencil(vtkIdType value) = 0;
193  virtual void TestStencil(vtkIdType value) = 0;
195 
196 protected:
199 
200 private:
201  vtkPainterDeviceAdapter(const vtkPainterDeviceAdapter &); // Not implemented.
202  void operator=(const vtkPainterDeviceAdapter &); // Not implemented.
203 };
204 
206  vtkDataArray *attributeArray)
207 {
208  this->SetAttributePointer(index, attributeArray->GetNumberOfComponents(),
209  attributeArray->GetDataType(), 0,
210  attributeArray->GetVoidPointer(0));
211 }
212 
213 #endif //_vtkPainterDeviceAdapter_h
const GLint * first
Definition: vtkgl.h:11686
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
abstract base class for most VTK objects
Definition: vtkObject.h:61
GLuint index
Definition: vtkgl.h:11983
GLintptr offset
Definition: vtkgl.h:11844
GLuint GLuint GLsizei count
Definition: vtkgl.h:11315
GLenum GLenum GLuint components
Definition: vtkgl.h:16909
abstract specification for renderers
Definition: vtkRenderer.h:63
virtual int GetDataType()=0
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
int vtkIdType
Definition: vtkType.h:268
GLsizei stride
Definition: vtkgl.h:11728
virtual void PrintSelf(ostream &os, vtkIndent indent)
An adapter between a vtkPainter and a rendering device.
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void SetAttributePointer(int index, vtkDataArray *attributeArray)
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: vtkgl.h:11315
virtual void * GetVoidPointer(vtkIdType id)=0
GLsizei const GLvoid * pointer
Definition: vtkgl.h:11728
#define VTKRENDERINGCORE_EXPORT
static vtkObject * New()
GLenum mode
Definition: vtkgl.h:12325