vtkSequencePass.h 2.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkSequencePass.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
15 16 17 18 19 20 21 22 23 24 25 26 27 28
/**
 * @class   vtkSequencePass
 * @brief   Execute render passes sequentially.
 *
 * vtkSequencePass executes a list of render passes sequentially.
 * This class allows to define a sequence of render passes at run time.
 * The other solution to write a sequence of render passes is to write an
 * effective subclass of vtkRenderPass.
 *
 * As vtkSequencePass is a vtkRenderPass itself, it is possible to have a
 * hierarchy of render passes built at runtime.
 * @sa
 * vtkRenderPass
*/
29

30 31
#ifndef vtkSequencePass_h
#define vtkSequencePass_h
32 33 34 35 36 37 38 39 40 41 42 43 44

#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkRenderPass.h"

class vtkRenderPassCollection;

class VTKRENDERINGOPENGL2_EXPORT vtkSequencePass : public vtkRenderPass
{
public:
  static vtkSequencePass *New();
  vtkTypeMacro(vtkSequencePass,vtkRenderPass);
  void PrintSelf(ostream& os, vtkIndent indent);

45 46 47 48
  /**
   * Perform rendering according to a render state \p s.
   * \pre s_exists: s!=0
   */
49 50
  virtual void Render(const vtkRenderState *s);

51 52 53 54 55
  /**
   * Release graphics resources and ask components to release their own
   * resources.
   * \pre w_exists: w!=0
   */
56 57
  virtual void ReleaseGraphicsResources(vtkWindow *w);

58 59 60 61 62 63 64
  //@{
  /**
   * The ordered list of render passes to execute sequentially.
   * If the pointer is NULL or the list is empty, it is silently ignored.
   * There is no warning.
   * Initial value is a NULL pointer.
   */
65 66
  vtkGetObjectMacro(Passes,vtkRenderPassCollection);
  virtual void SetPasses(vtkRenderPassCollection *passes);
67
  //@}
68 69 70 71 72 73 74 75

protected:
  vtkRenderPassCollection *Passes;

  vtkSequencePass();
  virtual ~vtkSequencePass();

private:
76
  vtkSequencePass(const vtkSequencePass&) VTK_DELETE_FUNCTION;
77
  void operator=(const vtkSequencePass&) VTK_DELETE_FUNCTION;
78 79 80
};

#endif