VTK
dox/Rendering/vtkOpenGLPainterDeviceAdapter.h
Go to the documentation of this file.
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 "vtkPainterDeviceAdapter.h"
00046 
00047 // To switch off deprecated warning about
00048 // vtkPainterDeviceAdapter::MakeVertexEmphasisWithStencilCheck
00049 #if defined(_MSC_VER) && _MSC_VER >= 1300
00050 #pragma warning(push)
00051 #pragma warning(disable:4996)
00052 #endif
00053 
00054 class VTK_RENDERING_EXPORT vtkOpenGLPainterDeviceAdapter : 
00055   public vtkPainterDeviceAdapter
00056 {
00057 public:
00058   vtkTypeMacro(vtkOpenGLPainterDeviceAdapter, vtkPainterDeviceAdapter);
00059   static vtkOpenGLPainterDeviceAdapter *New();
00060   virtual void PrintSelf(ostream &os, vtkIndent indent);
00061 
00063   virtual void BeginPrimitive(int mode);
00064 
00066   virtual void EndPrimitive();
00067 
00070   virtual int IsAttributesSupported(int attribute);
00071 
00073 
00074   virtual void SendAttribute(int index, int components, int type,
00075                              const void *attribute, vtkIdType offset=0);
00077 
00079 
00080   virtual void SendMultiTextureCoords(int numcomp, int type, const void *attribute, 
00081                                       int idx, vtkIdType offset);
00083 
00085 
00087   virtual void SetAttributePointer(int index, int numcomponents, int type,
00088                                    int stride, const void *pointer);
00090 
00092 
00093   virtual void EnableAttributeArray(int index);
00094   virtual void DisableAttributeArray(int index);
00096 
00098   virtual void DrawArrays(int mode, vtkIdType first, vtkIdType count);
00099 
00102   virtual void DrawElements(int mode, vtkIdType count, int type, void *indices);
00103 
00105   virtual int Compatible(vtkRenderer *renderer);
00106 
00108   virtual void MakeLighting(int mode);
00109 
00111   virtual int QueryLighting();
00112 
00114   virtual void MakeMultisampling(int mode);
00115 
00117   virtual int QueryMultisampling();
00118 
00120   virtual void MakeBlending(int mode);
00121  
00123   virtual int QueryBlending();
00124 
00128   virtual void MakeVertexEmphasis(bool mode);
00129   
00131   VTK_LEGACY(virtual void MakeVertexEmphasisWithStencilCheck(int mode));
00132   
00134 
00135   virtual void Stencil(int on);
00136   virtual void WriteStencil(vtkIdType value);
00137   virtual void TestStencil(vtkIdType value);
00139 
00140 protected:
00141   vtkOpenGLPainterDeviceAdapter();
00142   ~vtkOpenGLPainterDeviceAdapter();
00143 
00144   double PointSize;
00145   double RangeNear;
00146   double RangeFar;
00147   int MaxStencil;
00148   bool Initialized;
00149 private:
00150   vtkOpenGLPainterDeviceAdapter(const vtkOpenGLPainterDeviceAdapter &);  // Not implemented.
00151   void operator=(const vtkOpenGLPainterDeviceAdapter &);  // Not implemented.
00152 };
00153 
00154 #if defined(_MSC_VER) && _MSC_VER >= 1300
00155 #pragma warning(pop)
00156 #endif
00157  
00158 #endif //_vtkOpenGLPainterDeviceAdapter_h