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 _VERTEXSHADERMANAGER_H
|
|
|
|
#define _VERTEXSHADERMANAGER_H
|
|
|
|
|
2008-12-26 10:33:53 -07:00
|
|
|
#include "VertexShaderGen.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-12-05 06:56:23 -07:00
|
|
|
struct ProjectionHack
|
|
|
|
{
|
2011-01-29 14:13:56 -07:00
|
|
|
float sign;
|
2009-12-05 06:56:23 -07:00
|
|
|
float value;
|
|
|
|
ProjectionHack() { }
|
2011-01-29 14:13:56 -07:00
|
|
|
ProjectionHack(float new_sign, float new_value)
|
|
|
|
: sign(new_sign), value(new_value) {}
|
2009-12-05 06:56:23 -07:00
|
|
|
};
|
|
|
|
|
2011-01-29 14:13:56 -07:00
|
|
|
void UpdateProjectionHack(int iParams[], std::string sParams[]);
|
2009-12-05 06:56:23 -07:00
|
|
|
|
2008-12-26 03:43:18 -07:00
|
|
|
// The non-API dependent parts.
|
|
|
|
class VertexShaderManager
|
|
|
|
{
|
|
|
|
public:
|
2009-09-15 15:49:15 -06:00
|
|
|
static void Init();
|
|
|
|
static void Dirty();
|
|
|
|
static void Shutdown();
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-09-15 15:49:15 -06:00
|
|
|
// constant management
|
2009-08-15 01:20:37 -06:00
|
|
|
static void SetConstants();
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-09-15 15:49:15 -06:00
|
|
|
static void InvalidateXFRange(int start, int end);
|
2011-02-05 11:25:34 -07:00
|
|
|
static void SetTexMatrixChangedA(u32 value);
|
|
|
|
static void SetTexMatrixChangedB(u32 value);
|
|
|
|
static void SetViewportChanged();
|
|
|
|
static void SetProjectionChanged();
|
|
|
|
static void SetMaterialColorChanged(int index);
|
2009-04-19 04:10:45 -06:00
|
|
|
|
2009-09-15 15:49:15 -06:00
|
|
|
static void TranslateView(float x, float y);
|
|
|
|
static void RotateView(float x, float y);
|
|
|
|
static void ResetView();
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
|
2009-07-26 03:52:35 -06:00
|
|
|
#endif // _VERTEXSHADERMANAGER_H
|