00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://ogre.sourceforge.net/ 00006 00007 Copyright © 2000-2002 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 "OgreMaterial.h" 00035 00036 namespace Ogre { 00037 00038 00047 class Quake3Shader : public Resource 00048 { 00049 protected: 00050 String getAlternateName(String texName); 00051 00052 public: 00053 00055 Quake3Shader(String name); 00056 ~Quake3Shader(); 00057 00059 virtual void load(void); 00061 virtual void unload(void); 00062 00067 Material* createAsMaterial(SceneManager* sm, int lightmapNumber); 00068 00069 struct Pass { 00070 unsigned int flags; 00071 String textureName; 00072 TexGen texGen; 00073 // Multitexture blend 00074 LayerBlendOperation blend; 00075 // Multipass blends (Quake3 only supports multipass?? Surely not?) 00076 SceneBlendFactor blendSrc; 00077 SceneBlendFactor blendDest; 00078 bool customBlend; 00079 CompareFunction depthFunc; 00080 Material::TextureLayer::TextureAddressingMode addressMode; 00081 // TODO - alphaFunc 00082 GenFunc rgbGenFunc; 00083 WaveType rgbGenWave; 00084 Real rgbGenParams[4]; // base, amplitude, phase, frequency 00085 Real tcModScale[2]; 00086 Real tcModRotate; 00087 Real tcModScroll[2]; 00088 Real tcModTransform[6]; 00089 bool tcModTurbOn; 00090 Real tcModTurb[4]; 00091 WaveType tcModStretchWave; 00092 Real tcModStretchParams[4]; // base, amplitude, phase, frequency 00093 CompareFunction alphaFunc; 00094 unsigned char alphaVal; 00095 00096 Real animFps; 00097 unsigned int animNumFrames; 00098 String frames[32]; 00099 }; 00100 00101 unsigned int flags; 00102 int numPasses; 00103 Pass pass[6]; 00104 bool farbox; // Skybox 00105 String farboxName; 00106 bool skyDome; 00107 Real cloudHeight; // Skydome 00108 DeformFunc deformFunc; 00109 Real deformParams[5]; 00110 ManualCullingMode cullMode; 00111 00112 bool fog; 00113 ColourValue fogColour; 00114 Real fogDistance; 00115 00116 }; 00117 } 00118 00119 #endif
Copyright © 2002 by The OGRE Team