VTK
vtkCgShaderProgram.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCgShaderProgram.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*
16  * Copyright 2003 Sandia Corporation.
17  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
18  * license for use of this work by or on behalf of the
19  * U.S. Government. Redistribution and use in source and binary forms, with
20  * or without modification, are permitted provided that this Notice and any
21  * statement of authorship are reproduced on all copies.
22  */
23 
44 #ifndef __vtkCgShaderProgram_h
45 #define __vtkCgShaderProgram_h
46 
47 #include "vtkShaderProgram.h"
48 
49 class vtkActor;
50 class vtkRenderer;
51 
53 {
54 public:
56  static vtkCgShaderProgram *New();
57  void PrintSelf(ostream &os, vtkIndent indent);
58 
59  // .Description:
60  // Take shader from its source (file and/or string) and load, compile, and
61  // install in hardware. Also, initialize uniform variables originating from
62  // the following sources: XML material file, vtkProperty, vtkLight,
63  // vtkCamera, and application-specified uniform variables.
64  //
65  // Delegates to vtkShader.
66  virtual void Render(vtkActor*, vtkRenderer*);
67 
68 protected:
71 
73 
74  virtual vtkShader* NewShader();
75 private:
76  vtkCgShaderProgram(const vtkCgShaderProgram&); // Not Implemented
77  void operator=(const vtkCgShaderProgram&); // Not Implemented
78 };
79 #endif //__vtkCgShaderProgram_h
80 
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
abstract specification for renderers
Definition: vtkRenderer.h:69
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void Render(vtkActor *, vtkRenderer *)=0
virtual vtkShader * NewShader()=0
#define VTK_RENDERING_EXPORT
Cg Shader Program.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()