zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Fog.h
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
32 #ifndef ZENI_FOG_H
33 #define ZENI_FOG_H
34 
35 #include <Zeni/Color.h>
36 
37 #include <Zeni/Define.h>
38 
39 namespace Zeni {
40 
41  class ZENI_GRAPHICS_DLL Video_GL_Fixed;
42  class ZENI_GRAPHICS_DLL Video_GL_Shader;
43  class ZENI_GRAPHICS_DLL Video_DX9;
44 
45  enum FOG_TYPE {FOG_LINEAR = 1, FOG_EXP = 2, FOG_EXP2 = 3};
46 
47  struct ZENI_GRAPHICS_DLL Fog {
48  Fog(const Color &color_ = ZENI_DEFAULT_FOG_COLOR,
49  const float &density_ = ZENI_DEFAULT_FOG_DENSITY,
50  const FOG_TYPE &type_ = ZENI_DEFAULT_FOG_TYPE,
51  const float &start_ = ZENI_DEFAULT_FOG_START,
52  const float &end_ = ZENI_DEFAULT_FOG_END);
53 
54 #ifndef DISABLE_GL_FIXED
55  void set(Video_GL_Fixed &screen) const;
56 #endif
57 
58 #ifndef DISABLE_GL_SHADER
59  void set(Video_GL_Shader &screen) const;
60 #endif
61 
62 #ifndef DISABLE_DX9
63  void set(Video_DX9 &screen) const;
64 #endif
65 
68  float density;
69  float start;
70  float end;
71  };
72 
73 }
74 
75 #include <Zeni/Undefine.h>
76 
77 #endif
The Direct3D9 Rendering System.
Definition: Video_DX9.h:62
Color color
Color muxed with the rendering.
Definition: Fog.h:67
float start
used when FOGTYPE == FOG_LINEAR
Definition: Fog.h:69
#define ZENI_DEFAULT_FOG_END
Definition: Define.h:41
#define ZENI_DEFAULT_FOG_DENSITY
Definition: Define.h:38
FOG_TYPE
Definition: Fog.h:45
The OpenGL Rendering System.
An Abstraction of Fog.
Definition: Fog.h:47
#define ZENI_DEFAULT_FOG_COLOR
Definition: Define.h:37
The OpenGL Rendering System.
#define ZENI_DEFAULT_FOG_START
Definition: Define.h:40
float density
used when (FOGTYPE == FOG_EXP || FOGTYPE == FOG_EXP2)
Definition: Fog.h:68
#define ZENI_DEFAULT_FOG_TYPE
Definition: Define.h:39
FOG_TYPE type
The type of the Fog.
Definition: Fog.h:66
float end
used when FOGTYPE == FOG_LINEAR
Definition: Fog.h:70
Color.
Definition: Color.h:41