2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2016-01-17 14:54:31 -07:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "VideoCommon/ConstantManager.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2012-01-01 13:46:02 -07:00
|
|
|
class PointerWrap;
|
|
|
|
|
2008-12-26 03:43:18 -07:00
|
|
|
// The non-API dependent parts.
|
|
|
|
class VertexShaderManager
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
static void Init();
|
|
|
|
static void Dirty();
|
|
|
|
static void DoState(PointerWrap& p);
|
|
|
|
|
|
|
|
// constant management
|
|
|
|
static void SetConstants();
|
|
|
|
|
|
|
|
static void InvalidateXFRange(int start, int end);
|
|
|
|
static void SetTexMatrixChangedA(u32 value);
|
|
|
|
static void SetTexMatrixChangedB(u32 value);
|
|
|
|
static void SetViewportChanged();
|
|
|
|
static void SetProjectionChanged();
|
|
|
|
static void SetMaterialColorChanged(int index);
|
|
|
|
|
2017-07-19 23:25:27 -06:00
|
|
|
static void SetVertexFormat(u32 components);
|
|
|
|
static void SetTexMatrixInfoChanged(int index);
|
|
|
|
static void SetLightingConfigChanged();
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
// data: 3 floats representing the X, Y and Z vertex model coordinates and the posmatrix index.
|
|
|
|
// out: 4 floats which will be initialized with the corresponding clip space coordinates
|
|
|
|
// NOTE: g_fProjectionMatrix must be up to date when this is called
|
|
|
|
// (i.e. VertexShaderManager::SetConstants needs to be called before using this!)
|
|
|
|
static void TransformToClipSpace(const float* data, float* out, u32 mtxIdx);
|
|
|
|
|
|
|
|
static VertexShaderConstants constants;
|
|
|
|
static bool dirty;
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|