Arachnoid GLESv1.1 plugin. Compile and run (a bit glitchy and no frameskip) on the...
[mupen64plus-pandora.git] / source / mupen64plus-video-arachnoid / src / framebuffer / FrameBuffer.h
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 FRAME_BUFFER_H_
23 #define FRAME_BUFFER_H_
24
25
26 //*****************************************************************************
27 //* FrameBuffer
28 //! A Texture that we can render to.
29 //*****************************************************************************
30 class FrameBuffer
31 {
32 public:
33
34     //Get Singleton
35     //static FrameBuffer& getSingleton() {
36     //    static FrameBuffer instance;
37     //    return instance;
38     //}
39
40     //Constructor
41     FrameBuffer();
42
43     //Destructor
44     ~FrameBuffer();
45
46     void initialize(int width, int height);
47     void dispose();
48     void resize(int width, int height);
49     void beginRendering();
50     void endRendering();
51     void render();
52     void render2();
53
54 protected:
55
56     void _activate();
57     void _deactivate();
58
59 private:
60
61
62
63 protected:
64
65     unsigned int m_id;       //!< TextureID, Used mainly for OpenGL (so it can keep track of textures)
66     int m_width;             //!< Width of framebuffer
67     int m_height;            //!< Height of framebuffer 
68
69     int m_oldViewport[4];
70
71
72 };
73
74 #endif