2 Copyright (C) 2005 Rice1964
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program 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 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #ifndef _OGL_FRAGMENT_SHADER_H_
20 #define _OGL_FRAGMENT_SHADER_H_
24 #include <SDL_opengl.h>
26 #include "OGLCombiner.h"
27 #include "OGLExtCombiner.h"
28 #include "GeneralCombiner.h"
36 } OGLShaderCombinerSaveType;
39 class COGL_FragmentProgramCombiner : public COGLColorCombiner4
42 bool Initialize(void);
45 friend class OGLDeviceBuilder;
47 void DisableCombiner(void);
48 void InitCombinerCycleCopy(void);
49 void InitCombinerCycleFill(void);
50 void InitCombinerCycle12(void);
52 COGL_FragmentProgramCombiner(CRender *pRender);
53 ~COGL_FragmentProgramCombiner();
55 bool m_bFragmentProgramIsSupported;
56 std::vector<OGLShaderCombinerSaveType> m_vCompiledShaders;
59 virtual int ParseDecodedMux();
60 virtual void GenerateProgramStr();
61 int FindCompiledMux();
62 virtual void GenerateCombinerSetting(int index);
63 virtual void GenerateCombinerSettingConstants(int index);
66 void DisplaySimpleMuxString(void);
73 class COGLFragmentShaderCombiner : public COGLColorCombiner
76 bool Initialize(void);
77 void InitCombinerBlenderForSimpleTextureDraw(uint32 tile=0);
79 friend class OGLDeviceBuilder;
81 void DisableCombiner(void);
82 void InitCombinerCycleCopy(void);
83 void InitCombinerCycleFill(void);
84 void InitCombinerCycle12(void);
86 COGLFragmentShaderCombiner(CRender *pRender);
87 ~COGLFragmentShaderCombiner();
89 bool m_bShaderIsSupported;
92 void DisplaySimpleMuxString(void);