22726e4d |
1 | /****************************************************************************** |
2 | * Arachnoid Graphics Plugin for Mupen64Plus |
3 | * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/ |
4 | * |
5 | * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson |
6 | * |
7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License |
9 | * as published by the Free Software Foundation; either version 2 |
10 | * of the License, or (at your option) any later version. |
11 | * |
12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. |
16 | * |
17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
20 | *****************************************************************************/ |
21 | |
22 | #ifndef OPEN_GL_2D_RENDERER_H_ |
23 | #define OPEN_GL_2D_RENDERER_H_ |
24 | |
25 | //Forward declarations |
26 | class VI; |
27 | |
28 | //***************************************************************************** |
29 | //* OpenGL 2D Renderer |
30 | //! Class used to render HUD objects. |
31 | //! @details Renders 2D quads, textured 2D quads and flipped textures 2D quads. |
32 | //***************************************************************************** |
33 | class OpenGL2DRenderer |
34 | { |
35 | public: |
36 | |
37 | //Initialize |
38 | bool initialize(VI* vi); |
39 | |
40 | //Render Quad |
41 | void renderQuad( const float color[4], |
42 | float x0, float y0, |
43 | float x1, float y1, |
44 | float depth ); |
45 | |
46 | |
47 | //Render Textured Quad |
48 | void renderTexturedQuad( const float color[4], |
49 | const float secondaryColor[4], |
50 | float x0, float y0, |
51 | float x1, float y1, |
52 | float depth, |
53 | float t0s0, float t0t0, |
54 | float t0s1, float t0t1, |
55 | float t1s0, float t1t0, |
56 | float t1s1, float t1t1 ); |
57 | |
58 | //Render Flipped Textured Quad |
59 | void renderFlippedTexturedQuad( const float color[4], |
60 | const float secondaryColor[4], |
61 | float x0, float y0, |
62 | float x1, float y1, |
63 | float depth, |
64 | float t0s0, float t0t0, |
65 | float t0s1, float t0t1, |
66 | float t1s0, float t1t0, |
67 | float t1s1, float t1t1 ); |
68 | |
69 | |
70 | private: |
71 | |
72 | VI* m_vi; //!< Video interface |
73 | |
74 | }; |
75 | |
76 | #endif |