summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderManager.h
blob: 92d7e6da8f8de14778b03db91b79eee580acb98a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <string>

#include "Common/CommonTypes.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/NativeVertexFormat.h"

namespace VertexLoaderManager
{
	void Init();
	void Shutdown();

	void MarkAllDirty();

	// Returns -1 if buf_size is insufficient, else the amount of bytes consumed
	int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing, bool is_preprocess);

	// For debugging
	void AppendListToString(std::string *dest);

	NativeVertexFormat* GetCurrentVertexFormat();

	// Resolved pointers to array bases. Used by vertex loaders.
	extern u8 *cached_arraybases[12];
	void UpdateVertexArrayPointers();

	// Position cache for zfreeze (3 vertices, 4 floats each to allow SIMD overwrite).
	// These arrays are in reverse order.
	extern float position_cache[3][4];
	extern u32 position_matrix_index[3];
}