2013-04-18 03:09:55 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
2012-01-01 20:46:02 +00:00
|
|
|
class PointerWrap;
|
|
|
|
|
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
|
|
|
|
2012-05-27 06:03:26 +00:00
|
|
|
void UpdateViewportWithCorrection();
|
|
|
|
|
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();
|
2012-01-01 20:46:02 +00:00
|
|
|
static void DoState(PointerWrap &p);
|
2013-03-20 01:51:12 +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
|