2009-07-28 15:32:10 -06:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef _PIXELSHADERMANAGER_H
|
|
|
|
#define _PIXELSHADERMANAGER_H
|
|
|
|
|
2009-06-22 03:31:30 -06:00
|
|
|
#include "BPMemory.h"
|
2010-09-22 20:17:48 -06:00
|
|
|
#include "XFMemory.h"
|
2008-12-26 10:33:53 -07:00
|
|
|
#include "PixelShaderGen.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2008-12-26 03:43:18 -07:00
|
|
|
// The non-API dependent parts.
|
|
|
|
class PixelShaderManager
|
|
|
|
{
|
|
|
|
static void SetPSTextureDims(int texid);
|
2008-12-07 21:46:09 -07:00
|
|
|
public:
|
2008-12-26 03:43:18 -07:00
|
|
|
static void Init();
|
2009-09-15 15:49:15 -06:00
|
|
|
static void Dirty();
|
2008-12-26 03:43:18 -07:00
|
|
|
static void Shutdown();
|
|
|
|
|
|
|
|
static void SetConstants(); // sets pixel shader constants
|
|
|
|
|
|
|
|
// constant management, should be called after memory is committed
|
|
|
|
static void SetColorChanged(int type, int index);
|
|
|
|
static void SetAlpha(const AlphaFunc& alpha);
|
|
|
|
static void SetDestAlpha(const ConstantAlpha& alpha);
|
|
|
|
static void SetTexDims(int texmapid, u32 width, u32 height, u32 wraps, u32 wrapt);
|
|
|
|
static void SetZTextureBias(u32 bias);
|
2011-02-05 11:25:34 -07:00
|
|
|
static void SetViewportChanged();
|
2008-12-26 03:43:18 -07:00
|
|
|
static void SetIndMatrixChanged(int matrixidx);
|
|
|
|
static void SetTevKSelChanged(int id);
|
2009-02-08 15:08:20 -07:00
|
|
|
static void SetZTextureTypeChanged();
|
2009-04-14 21:55:38 -06:00
|
|
|
static void SetIndTexScaleChanged(u8 stagemask);
|
|
|
|
static void SetTexCoordChanged(u8 texmapid);
|
2009-09-15 15:49:15 -06:00
|
|
|
static void SetFogColorChanged();
|
|
|
|
static void SetFogParamChanged();
|
2011-01-28 21:31:56 -07:00
|
|
|
static void SetFogRangeAdjustChanged();
|
2011-01-07 12:23:57 -07:00
|
|
|
static void SetColorMatrix(const float* pmatrix);
|
2010-09-22 20:17:48 -06:00
|
|
|
static void InvalidateXFRange(int start, int end);
|
2011-02-05 11:25:34 -07:00
|
|
|
static void SetMaterialColorChanged(int index);
|
2011-01-28 21:31:56 -07:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-07-26 03:52:35 -06:00
|
|
|
#endif // _PIXELSHADERMANAGER_H
|