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