dolphin/Source/Core/VideoCommon/VertexLoaderManager.h
degasus bb2fc8ecbb VideoCommon: Cache native vertex formats
We are used to have a 1:1 mapping of GX vertex formats and the native (OGL + D3D) ones, but there are by far more GX ones.
This new cache maps them directly so that we don't flush on GX vertex format changes as long as the native one doesn't change.

The idea is stolen from galop1n.
2014-07-04 14:39:27 +02:00

28 lines
613 B
C++

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include <string>
#include "Common/Common.h"
#include "VideoCommon/NativeVertexFormat.h"
namespace VertexLoaderManager
{
void Init();
void Shutdown();
void MarkAllDirty();
int GetVertexSize(int vtx_attr_group);
void RunVertices(int vtx_attr_group, int primitive, int count);
// For debugging
void AppendListToString(std::string *dest);
NativeVertexFormat* GetNativeVertexFormat(const PortableVertexDeclaration& format, u32 components);
};
void RecomputeCachedArraybases();