00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00046 #ifndef __vtkPainterDeviceAdapter_h
00047 #define __vtkPainterDeviceAdapter_h
00048
00049 #include "vtkObject.h"
00050 #include "vtkDataArray.h"
00051 class vtkRenderer;
00052
00053 class VTK_RENDERING_EXPORT vtkPainterDeviceAdapter : public vtkObject
00054 {
00055 public:
00056 static vtkPainterDeviceAdapter* New();
00057 vtkTypeMacro(vtkPainterDeviceAdapter, vtkObject);
00058 virtual void PrintSelf(ostream &os, vtkIndent indent);
00059
00068 virtual void BeginPrimitive(int mode) = 0;
00069
00071 virtual void EndPrimitive() = 0;
00072
00075 virtual int IsAttributesSupported(int attribute)=0;
00076
00078
00079 virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute,
00080 int idx, vtkIdType offset) = 0;
00082
00084
00094 virtual void SendAttribute(int index, int components, int type,
00095 const void *attribute, vtkIdType offset=0) = 0;
00097
00103 void SetAttributePointer(int index, vtkDataArray *attributeArray);
00104
00106
00115 virtual void SetAttributePointer(int index, int numcomponents, int type,
00116 int stride, const void *pointer) = 0;
00118
00120
00121 virtual void EnableAttributeArray(int index) = 0;
00122 virtual void DisableAttributeArray(int index) = 0;
00124
00134 virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count) = 0;
00135
00137
00149 virtual void DrawElements(int mode, vtkIdType count, int type,
00150 void *indices) = 0;
00152
00155 virtual int Compatible(vtkRenderer *renderer) = 0;
00156
00158 virtual void MakeLighting(int mode) = 0;
00159
00161 virtual int QueryLighting() = 0;
00162
00164 virtual void MakeMultisampling(int mode) = 0;
00165
00167 virtual int QueryMultisampling() = 0;
00168
00170 virtual void MakeBlending(int mode) = 0;
00171
00173 virtual int QueryBlending() = 0;
00174
00176 virtual void MakeVertexEmphasis(bool mode) = 0;
00177
00179 VTK_LEGACY(virtual void MakeVertexEmphasisWithStencilCheck(int vtkNotUsed(mode)));
00180
00182
00183 virtual void Stencil(int on) = 0;
00184 virtual void WriteStencil(vtkIdType value) = 0;
00185 virtual void TestStencil(vtkIdType value) = 0;
00187
00188 protected:
00189 vtkPainterDeviceAdapter();
00190 ~vtkPainterDeviceAdapter();
00191
00192 private:
00193 vtkPainterDeviceAdapter(const vtkPainterDeviceAdapter &);
00194 void operator=(const vtkPainterDeviceAdapter &);
00195 };
00196
00197 inline void vtkPainterDeviceAdapter::SetAttributePointer(int index,
00198 vtkDataArray *attributeArray)
00199 {
00200 this->SetAttributePointer(index, attributeArray->GetNumberOfComponents(),
00201 attributeArray->GetDataType(), 0,
00202 attributeArray->GetVoidPointer(0));
00203 }
00204
00205 #endif //_vtkPainterDeviceAdapter_h