2 fegdk: FE Game Development Kit
3 Copyright (C) 2001-2008 Alexey "waker" Yakovenko
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 waker@users.sourceforge.net
23 #ifndef __F_EFFECT_PASS
24 #define __F_EFFECT_PASS
33 class FE_API effectPass
: public fragileObject
36 friend class effectTechnique
;
68 shader_info_t mVertProgInfo
;
69 shader_info_t mFragProgInfo
;
71 shaderPtr mpVertexProgram
;
72 shaderPtr mpFragmentProgram
;
74 shader_redir_s mVertRedir
[256];
77 shader_redir_s mFragRedir
[256];
80 redir_s mTransformRedir
[11]; // world, view, proj, tex[8]
81 int mNumTransformRedirs
;
84 bool mbNeedResolveDeps
;
92 void apply (effect
&s
, uint32 flags
);
93 void finalize (void); // cancels post-effects of using programmable pipeline, etc
96 bool load (charParser
&p
, effect
&s
);
98 // parser helpers (transforms)
99 void readTransform (charParser
&p
, effect
&s
, GLenum t
, int reg
);
100 void readGlEnable (charParser
&p
, const GLenum cap
);
101 GLenum
readCmpFunc (charParser
&p
);
102 void readTSS (charParser
&p
, GLenum pname
);
110 shaderPtr
getVertProgram (void) const;
111 shaderPtr
getFragProgram (void) const;
117 #endif // __F_EFFECT_PASS