1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     demo_FontProgram.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_FONT_PROGRAM_OBJECT_H_
17 #define DEMO_FONT_PROGRAM_OBJECT_H_
18 
19 #include "demo/ShaderProgram/demo_ProgramObject.h"
20 
21 namespace demo
22 {
23 
24     /*!
25         :private
26 
27         @brief Class for shader program to render fonts.
28     */
29 
30     class FontProgram : public ProgramObject
31     {
32     public:
33         /*!
34         :private
35 
36         @brief    Constructor.
37         */
38         FontProgram(void);
39 
40         /*!
41         :private
42 
43         @brief    Destructor.
44         */
45         virtual ~FontProgram(void);
46 
47     public:
48         /*!
49         :private
50 
51         @brief    Performs initialization process for the shader program object.
52         */
53         virtual bool Initialize(const GLuint shaderId);
54 
55         /*!
56         :private
57 
58         @brief    Uses shader program object.
59         */
60         virtual bool Finalize(void);
61 
62     public:
63         /*!
64         :private
65 
66         @brief    Sets the rendering state before the shader program object is used.
67         */
68         virtual bool Begin(void);
69 
70         /*!
71         :private
72 
73         @brief    Uses shader program object.
74         */
75         virtual bool Use(void);
76 
77         /*!
78         :private
79 
80         @brief    Sets the rendering state after the shader program object is used.
81         */
82         virtual bool End(void);
83 
84     protected:
85         virtual void InitializeVertexAttributes(void);
86         void InitializeFontTexture(void);
87 
88     protected:
89         GLuint m_FontTextureId;
90     };
91 
92 }
93 
94 #endif
95