Arachnoid GLESv1.1 plugin. Compile and run (a bit glitchy and no frameskip) on the...
[mupen64plus-pandora.git] / source / mupen64plus-video-arachnoid / src / FogManager.h
CommitLineData
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 FOG_MANAGER_H_
23#define FOG_MANAGER_H_
24
25//*****************************************************************************
26//* Fog Manager
27//! Class for setting fog using OpenGL
28//! @details This manager has support for vertex based using OpenGL Extensions
29//*****************************************************************************
30class FogManager
31{
32public:
33
34 //Constructor / Destructor
35 FogManager();
36 ~FogManager();
37
38 //Initialize / Dispose
39 void initialize();
40 void dispose();
41
42 //Set Fog settings
43 void setLinearFog(float start=0, float end=255);
44 void setFogColor(float r, float g, float b, float a);
45
46 //Extensions (for vertex based fog)
47 void setFogCoordPointer(unsigned int type, int stride, const void* pointer);
48 void enableFogCoordArray();
49 void disableFogCoordArray();
50
51 //Get/Set N64 Settings
52 void setFogSettings(float multiplier, float offset) { m_multiplier = multiplier; m_offset = offset; }
53 float getMultiplier() { return m_multiplier; }
54 float getOffset() { return m_offset; }
55
56public:
57
58 //! Is fog extension supported?
59 static bool fogExtensionsSupported() { return m_fogExtensionsSupported; }
60
61private:
62
63 static bool m_fogExtensionsSupported; //!< Is fog extension supported
64 float m_multiplier; //!< Fog multiplier
65 float m_offset; //!< Fog offset
66
67};
68
69#endif