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 00109 virtual void MakeLighting(int mode); 00110 00112 virtual int QueryLighting(); 00113 00115 virtual void MakeMultisampling(int mode); 00116 00118 virtual int QueryMultisampling(); 00119 00121 virtual void MakeBlending(int mode); 00122 00124 virtual int QueryBlending(); 00125 00129 virtual void MakeVertexEmphasis(bool mode); 00130 00132 00133 virtual void Stencil(int on); 00134 virtual void WriteStencil(vtkIdType value); 00135 virtual void TestStencil(vtkIdType value); 00137 00138 protected: 00139 vtkOpenGLPainterDeviceAdapter(); 00140 ~vtkOpenGLPainterDeviceAdapter(); 00141 00142 double PointSize; 00143 double RangeNear; 00144 double RangeFar; 00145 int MaxStencil; 00146 bool Initialized; 00147 private: 00148 vtkOpenGLPainterDeviceAdapter(const vtkOpenGLPainterDeviceAdapter &); // Not implemented. 00149 void operator=(const vtkOpenGLPainterDeviceAdapter &); // Not implemented. 00150 }; 00151 00152 #if defined(_MSC_VER) 00153 #pragma warning(pop) 00154 #endif 00155 00156 #endif