summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/HwRasterizer.h
blob: a58f5416c482b025f0a8beb435196e63536942f4 (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
38
39
40
41
42
43
44
45
46
47
// Copyright 2009 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <map>

#include "VideoBackends/OGL/GLUtil.h"
#include "VideoBackends/Software/BPMemLoader.h"

struct OutputVertexData;

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

	void Prepare();

	void BeginTriangles();
	void EndTriangles();

	void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2);

	void Clear();

	struct TexCacheEntry
	{
		TexImage0 texImage0;
		TexImage1 texImage1;
		TexImage2 texImage2;
		TexImage3 texImage3;
		TexTLUT texTlut;

		GLuint texture;

		TexCacheEntry();

		void Create();
		void Destroy();
		void Update();
	};

	typedef std::map<u32, TexCacheEntry> TextureCache;
	static TextureCache textures;
}