# OgreQuake3Shader.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2005 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025 #ifndef __QUAKE3SHADER_H__
    00026 #define __QUAKE3SHADER_H__
    00027
    00028 #include "OgreResource.h"
    00029 #include "OgreBspPrerequisites.h"
    00030 #include "OgreQuake3Types.h"
    00031 #include "OgreCommon.h"
    00032 #include "OgreColourValue.h"
    00033 #include "OgreBlendMode.h"
    00034 #include "OgreTextureUnitState.h"
    00035
    00036 namespace Ogre {
    00037
    00038
    00047     class Quake3Shader
    00048     {
    00049     protected:
    00050         String getAlternateName(const String& texName);
    00051         String mName;
    00052
    00053     public:
    00054
    00056         Quake3Shader(const String& name);
    00057         ~Quake3Shader();
    00058
    00063         MaterialPtr createAsMaterial(int lightmapNumber);
    00064
    00065         struct Pass {
    00066             unsigned int flags;
    00067             String textureName;
    00068             TexGen texGen;
    00069             // Multitexture blend
    00070             LayerBlendOperation blend;
    00071             // Multipass blends (Quake3 only supports multipass?? Surely not?)
    00072             SceneBlendFactor blendSrc;
    00073             SceneBlendFactor blendDest;
    00074             bool customBlend;
    00075             CompareFunction depthFunc;
    00076             TextureUnitState::TextureAddressingMode addressMode;
    00077             // TODO - alphaFunc
    00078             GenFunc rgbGenFunc;
    00079             WaveType rgbGenWave;
    00080             Real rgbGenParams[4];    // base, amplitude, phase, frequency
    00081             Real tcModScale[2];
    00082             Real tcModRotate;
    00083             Real tcModScroll[2];
    00084             Real tcModTransform[6];
    00085             bool tcModTurbOn;
    00086             Real tcModTurb[4];
    00087             WaveType tcModStretchWave;
    00088             Real tcModStretchParams[4];    // base, amplitude, phase, frequency
    00089             CompareFunction alphaFunc;
    00090             unsigned char alphaVal;
    00091
    00092             Real animFps;
    00093             unsigned int animNumFrames;
    00094             String frames[32];
    00095         };
    00096
    00097         unsigned int flags;
    00098         int numPasses;
    00099         typedef std::vector<Pass> PassList;
    00100         PassList pass;
    00101         bool farbox;            // Skybox
    00102         String farboxName;
    00103         bool skyDome;
    00104         Real cloudHeight;       // Skydome
    00105         DeformFunc deformFunc;
    00106         Real deformParams[5];
    00107         ManualCullingMode cullMode;
    00108
    00109         bool fog;
    00110         ColourValue fogColour;
    00111         Real fogDistance;
    00112
    00113     };
    00114 }
    00115
    00116 #endif

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:36:04 2005