1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: demo_DecalTextureProgram.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 46365 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef DEMO_DECAL_TEXTURE_PROGRAM_OBJECT_H_ 17 #define DEMO_DECAL_TEXTURE_PROGRAM_OBJECT_H_ 18 19 #include "demo/ShaderProgram/demo_ProgramObject.h" 20 21 namespace demo 22 { 23 24 /*! 25 :private 26 27 @brief Shader program class for performing texture decals on polygons. 28 */ 29 30 class DecalTextureProgram : public ProgramObject 31 { 32 public: 33 /*! 34 :private 35 36 @brief Constructor. 37 */ 38 DecalTextureProgram(void); 39 40 /*! 41 :private 42 43 @brief Destructor. 44 */ 45 virtual ~DecalTextureProgram(void); 46 47 public: 48 /*! 49 :private 50 51 @brief Performs initialization for the shader program object. 52 */ 53 virtual bool Initialize(const GLuint shaderId); 54 55 /*! 56 :private 57 58 @brief Performs termination for the shader program object. 59 */ 60 virtual bool Finalize(void); 61 public: 62 /*! 63 :private 64 65 @brief Uses shader program object. 66 */ 67 virtual bool Use(void); 68 69 public: 70 /*! 71 :private 72 73 @brief Sets a texture object handle. 74 75 @param[in] textureId Texture object handle 76 */ 77 virtual void SetTextureId(const GLuint textureId); 78 79 /*! 80 :private 81 82 @brief Updates the internal state of the shader program object. 83 */ 84 virtual void Update(void); 85 86 protected: 87 virtual void InitializeVertexAttributes(void); 88 89 protected: 90 GLuint m_TextureId; 91 }; 92 93 } 94 95 #endif 96