ATI_FS_GLGpuProgram.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. -----------------------------------------------------------------------------
  3. This source file is part of OGRE
  4. (Object-oriented Graphics Rendering Engine)
  5. For the latest info, see http://www.ogre3d.org/
  6. Copyright (c) 2000-2011 Torus Knot Software Ltd
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. -----------------------------------------------------------------------------
  23. */
  24. #ifndef __ATI_FS_GLGpuProgram_H__
  25. #define __ATI_FS_GLGpuProgram_H__
  26. #include "CmGLPrerequisites.h"
  27. #include "CmGLGpuProgram.h"
  28. namespace CamelotEngine {
  29. /** Specialisation of the GL low-level program for ATI Fragment Shader programs. */
  30. class _OgreGLExport ATI_FS_GLGpuProgram : public GLGpuProgram
  31. {
  32. public:
  33. ATI_FS_GLGpuProgram();
  34. virtual ~ATI_FS_GLGpuProgram();
  35. /// Execute the binding functions for this program
  36. void bindProgram(void);
  37. /// Execute the unbinding functions for this program
  38. void unbindProgram(void);
  39. /// Execute the param binding functions for this program
  40. void bindProgramParameters(GpuProgramParametersSharedPtr params, UINT16 mask);
  41. /** Execute the pass iteration param binding functions for this program.
  42. Only binds those parameters used for multipass rendering
  43. */
  44. void bindProgramPassIterationParameters(GpuProgramParametersSharedPtr params);
  45. /// Get the assigned GL program id
  46. const GLuint getProgramID(void) const
  47. { return mProgramID; }
  48. protected:
  49. /// @copydoc Resource::unload
  50. void unloadImpl(void);
  51. void loadFromSource(void);
  52. }; // class ATI_FS_GLGpuProgram
  53. }; // namespace CamelotEngine
  54. #endif // __ATI_FS_GLGpuProgram_H__