1 /******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
5 * Copyright (C) 2009 Jon Ring
6 * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef GRAPHICS_PLUGIN_H_
24 #define GRAPHICS_PLUGIN_H_
26 #include "TextureCache.h"
27 #include "OpenGLManager.h" //Initializes OpenGL and handles OpenGL states
31 //Forward declarations
35 class DisplayListParser;
40 //*****************************************************************************
42 //! Main class for application
43 //*****************************************************************************
48 //Constructor / Destructor
53 void setConfig(ConfigMap* config) { m_config = config; }
56 //Function called when rom will be opened
57 bool initialize(GFX_INFO* graphicsInfo);
60 void processDisplayList();
62 void setDrawScreenSignal();
65 void toggleFullscreen();
68 void takeScreenshot(void *dest, int *width, int *height, int front);
70 //Called when the video interface has been changed
71 void viStatusChanged();
73 //Function called when rom will be closed
79 void _setWindowMode(int width, int height);
80 void _setTextureCacheSize(int sizeInBytes);
86 GFX_INFO* m_graphicsInfo; //!< Information about window, memory...
87 RSP m_rsp; //!< Reality Signal Processor, does transform, clipping, lighting, triangle setup
88 RDP m_rdp; //!< Reality Drawing Processor
89 GBI m_gbi; //!< Graphics Binary Interface, handles mapping of GBI-commands
90 VI* m_vi; //!< Video Interface
91 Memory* m_memory; //!< Handle RDRAM, Texture Memory and Segments
92 TextureCache m_textureCache; //!< Save used texture for reuse
93 ROMDetector* m_romDetector; //!<
94 OpenGLManager& m_openGLMgr; //!< Handles initialization of OpenGL and OpenGL states.
95 DisplayListParser* m_displayListParser; //!< Parses and performs instructions from emulator
96 ConfigMap* m_config; //!< Settings from config dialog/file
97 FogManager* m_fogManager; //!< Handles fog extension
98 bool m_updateConfig; //!< Does configuration need to be updated?
99 bool m_initialized; //!< Have graphics plugin been initialized?
100 int m_numDListProcessed;