00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCgShaderProgram.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 2003 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 00044 #ifndef __vtkCgShaderProgram_h 00045 #define __vtkCgShaderProgram_h 00046 00047 #include "vtkShaderProgram.h" 00048 00049 class vtkActor; 00050 class vtkRenderer; 00051 00052 class VTK_RENDERING_EXPORT vtkCgShaderProgram : public vtkShaderProgram 00053 { 00054 public: 00055 vtkTypeMacro(vtkCgShaderProgram, vtkShaderProgram); 00056 static vtkCgShaderProgram *New(); 00057 void PrintSelf(ostream &os, vtkIndent indent); 00058 00059 // .Description: 00060 // Take shader from its source (file and/or string) and load, compile, and 00061 // install in hardware. Also, initialize uniform variables originating from 00062 // the following sources: XML material file, vtkProperty, vtkLight, 00063 // vtkCamera, and application-specified uniform variables. 00064 // 00065 // Delegates to vtkShader. 00066 virtual void Render(vtkActor*, vtkRenderer*); 00067 00068 protected: 00069 vtkCgShaderProgram(); 00070 ~vtkCgShaderProgram(); 00071 00073 00074 virtual vtkShader* NewShader(); 00075 private: 00076 vtkCgShaderProgram(const vtkCgShaderProgram&); // Not Implemented 00077 void operator=(const vtkCgShaderProgram&); // Not Implemented 00078 }; 00079 #endif //__vtkCgShaderProgram_h 00080