Project

General

Profile

SO3Engine
SO3DeferredLightPermutation.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
25#ifndef __SO3_DEFERRED_SHADING_LIGHT_PERMUTATION_H__
26#define __SO3_DEFERRED_SHADING_LIGHT_PERMUTATION_H__
27
29#include <Ogre.h>
30
31namespace SO3
32{
33
37{
38public:
40 {
41 //(Regular) Textures
42 SO3_LP_CAST_SHADOWS = 0x00000001,
43 SO3_LP_DEBUG = 0x00000010,
44 };
45 static const Ogre::uint32 SO3_DEFERRED_LIGHT_MAT_MASK = 0x000000FF; // The mask of the flags that matter for generating the material
46 static const Ogre::uint32 SO3_DEFERRED_LIGHT_VS_MASK = 0x00000000; // The mask of the flags that matter for generating the vertex shader
47 static const Ogre::uint32 SO3_DEFERRED_LIGHT_FS_MASK = 0x0000000F; // The mask of the flags that matter for generating the fragment shader
48 Ogre::uint32 flags;
49protected:
50private:
51
52public:
56
59 Ogre::uint32 operator &(const LightPermutations& perms);
60
63 Ogre::uint32 operator |(const LightPermutations& perms);
64
67 Ogre::uint32 operator |=(const LightPermutations& perms);
68protected:
72 virtual Ogre::uint32 GetPermutationsImpl();
73
77 virtual Ogre::uint32 GetMaterialPermutationsImpl();
78
82 virtual Ogre::uint32 GetVertexPermutationsImpl();
83
87 virtual Ogre::uint32 GetFragmentPermutationsImpl();
88
92 virtual std::string ToStringImpl();
93private:
94};
95
96}
97
98#endif
Ogre::uint32 operator|(const LightPermutations &perms)
static const Ogre::uint32 SO3_DEFERRED_LIGHT_FS_MASK
static const Ogre::uint32 SO3_DEFERRED_LIGHT_MAT_MASK
Ogre::uint32 operator&(const LightPermutations &perms)
Ogre::uint32 operator|=(const LightPermutations &perms)
static const Ogre::uint32 SO3_DEFERRED_LIGHT_VS_MASK