2018-11-15 23:31:39 +00:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
2011-12-10 14:21:37 +00:00
|
|
|
|
2011-07-02 02:25:13 +00:00
|
|
|
#ifndef CCGSHADER_H
|
|
|
|
#define CCGSHADER_H
|
|
|
|
|
|
|
|
#include "port.h"
|
|
|
|
#include "cgFunctions.h"
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
enum cgScaleType { CG_SCALE_NONE, CG_SCALE_SOURCE, CG_SCALE_VIEWPORT, CG_SCALE_ABSOLUTE };
|
|
|
|
typedef struct _cgScaleParams {
|
|
|
|
cgScaleType scaleTypeX;
|
|
|
|
cgScaleType scaleTypeY;
|
|
|
|
float scaleX;
|
|
|
|
float scaleY;
|
|
|
|
unsigned absX;
|
|
|
|
unsigned absY;
|
|
|
|
} cgScaleParams;
|
|
|
|
|
|
|
|
class CCGShader
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
cgScaleType scaleStringToEnum(const char* scale);
|
|
|
|
public:
|
|
|
|
typedef struct _shaderPass {
|
|
|
|
cgScaleParams scaleParams;
|
|
|
|
bool linearFilter;
|
|
|
|
bool filterSet;
|
2013-03-26 15:09:01 +00:00
|
|
|
bool floatFbo;
|
2013-03-26 14:39:17 +00:00
|
|
|
unsigned frameCounterMod;
|
2011-07-02 02:25:13 +00:00
|
|
|
char cgShaderFile[PATH_MAX];
|
|
|
|
} shaderPass;
|
|
|
|
typedef struct _lookupTexture {
|
|
|
|
char id[PATH_MAX];
|
|
|
|
char texturePath[PATH_MAX];
|
|
|
|
bool linearfilter;
|
|
|
|
} lookupTexture;
|
|
|
|
|
|
|
|
CCGShader(void);
|
|
|
|
~CCGShader(void);
|
|
|
|
bool LoadShader(const char *path);
|
|
|
|
|
2011-07-03 21:12:41 +00:00
|
|
|
typedef std::vector<shaderPass> passVector;
|
|
|
|
typedef std::vector<lookupTexture> lutVector;
|
|
|
|
passVector shaderPasses;
|
|
|
|
lutVector lookupTextures;
|
2011-07-02 02:25:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|