Added missing launcher
[mupen64plus-pandora.git] / source / gles2rice / src / OGLFragmentShaders.h
CommitLineData
292f9317 1/*
2Copyright (C) 2005 Rice1964
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17*/
18
19#ifndef _OGL_FRAGMENT_SHADER_H_
20#define _OGL_FRAGMENT_SHADER_H_
21
22#include <vector>
23
24#include <SDL_opengl.h>
25
26#include "OGLCombiner.h"
27#include "OGLExtCombiner.h"
28#include "GeneralCombiner.h"
29
30typedef struct {
31 uint32 dwMux0;
32 uint32 dwMux1;
33
34 bool fogIsUsed;
35 GLuint programID;
36} OGLShaderCombinerSaveType;
37
38
39class COGL_FragmentProgramCombiner : public COGLColorCombiner4
40{
41public:
42 bool Initialize(void);
43
44protected:
45 friend class OGLDeviceBuilder;
46
47 void DisableCombiner(void);
48 void InitCombinerCycleCopy(void);
49 void InitCombinerCycleFill(void);
50 void InitCombinerCycle12(void);
51
52 COGL_FragmentProgramCombiner(CRender *pRender);
53 ~COGL_FragmentProgramCombiner();
54
55 bool m_bFragmentProgramIsSupported;
56 std::vector<OGLShaderCombinerSaveType> m_vCompiledShaders;
57
58private:
59 virtual int ParseDecodedMux();
60 virtual void GenerateProgramStr();
61 int FindCompiledMux();
62 virtual void GenerateCombinerSetting(int index);
63 virtual void GenerateCombinerSettingConstants(int index);
64
65#ifdef DEBUGGER
66 void DisplaySimpleMuxString(void);
67#endif
68
69};
70
71
72
73class COGLFragmentShaderCombiner : public COGLColorCombiner
74{
75public:
76 bool Initialize(void);
77 void InitCombinerBlenderForSimpleTextureDraw(uint32 tile=0);
78protected:
79 friend class OGLDeviceBuilder;
80
81 void DisableCombiner(void);
82 void InitCombinerCycleCopy(void);
83 void InitCombinerCycleFill(void);
84 void InitCombinerCycle12(void);
85
86 COGLFragmentShaderCombiner(CRender *pRender);
87 ~COGLFragmentShaderCombiner();
88
89 bool m_bShaderIsSupported;
90
91#ifdef DEBUGGER
92 void DisplaySimpleMuxString(void);
93#endif
94
95};
96
97
98#endif
99