VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLPainterDeviceAdapter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /* 00016 * Copyright 2004 Sandia Corporation. 00017 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00018 * license for use of this work by or on behalf of the 00019 * U.S. Government. Redistribution and use in source and binary forms, with 00020 * or without modification, are permitted provided that this Notice and any 00021 * statement of authorship are reproduced on all copies. 00022 */ 00023 00042 #ifndef vtkOpenGLPainterDeviceAdapter_h 00043 #define vtkOpenGLPainterDeviceAdapter_h 00044 00045 #include "vtkRenderingOpenGLModule.h" // For export macro 00046 #include "vtkPainterDeviceAdapter.h" 00047 00048 // To switch off deprecated warning about 00049 // vtkPainterDeviceAdapter::MakeVertexEmphasisWithStencilCheck 00050 #if defined(_MSC_VER) 00051 #pragma warning(push) 00052 #pragma warning(disable:4996) 00053 #endif 00054 00055 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPainterDeviceAdapter : 00056 public vtkPainterDeviceAdapter 00057 { 00058 public: 00059 vtkTypeMacro(vtkOpenGLPainterDeviceAdapter, vtkPainterDeviceAdapter); 00060 static vtkOpenGLPainterDeviceAdapter *New(); 00061 virtual void PrintSelf(ostream &os, vtkIndent indent); 00062 00064 virtual void BeginPrimitive(int mode); 00065 00067 virtual void EndPrimitive(); 00068 00071 virtual int IsAttributesSupported(int attribute); 00072 00074 00075 virtual void SendAttribute(int index, int components, int type, 00076 const void *attribute, vtkIdType offset=0); 00078 00080 00081 virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute, 00082 int idx, vtkIdType offset); 00084 00086 00088 virtual void SetAttributePointer(int index, int numcomponents, int type, 00089 int stride, const void *pointer); 00091 00093 00094 virtual void EnableAttributeArray(int index); 00095 virtual void DisableAttributeArray(int index); 00097 00099 virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count); 00100 00103 virtual void DrawElements(int mode, vtkIdType count, int type, void *indices); 00104 00106 virtual int Compatible(vtkRenderer *renderer); 00107 00110 VTK_LEGACY(virtual void MakeLighting(int mode)); 00111 00114 VTK_LEGACY(virtual int QueryLighting()); 00115 00118 VTK_LEGACY(virtual void MakeMultisampling(int mode)); 00119 00122 VTK_LEGACY(virtual int QueryMultisampling()); 00123 00126 VTK_LEGACY(virtual void MakeBlending(int mode)); 00127 00130 VTK_LEGACY(virtual int QueryBlending()); 00131 00135 virtual void MakeVertexEmphasis(bool mode); 00136 00138 00139 virtual void Stencil(int on); 00140 virtual void WriteStencil(vtkIdType value); 00141 virtual void TestStencil(vtkIdType value); 00143 00144 protected: 00145 vtkOpenGLPainterDeviceAdapter(); 00146 ~vtkOpenGLPainterDeviceAdapter(); 00147 00148 double PointSize; 00149 double RangeNear; 00150 double RangeFar; 00151 int MaxStencil; 00152 bool Initialized; 00153 private: 00154 vtkOpenGLPainterDeviceAdapter(const vtkOpenGLPainterDeviceAdapter &); // Not implemented. 00155 void operator=(const vtkOpenGLPainterDeviceAdapter &); // Not implemented. 00156 }; 00157 00158 #if defined(_MSC_VER) 00159 #pragma warning(pop) 00160 #endif 00161 00162 #endif