Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/GPU/GLES/GPU_GLES.h
3187 views
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include <string>
21
22
#include "Common/File/Path.h"
23
24
#include "GPU/GPUCommonHW.h"
25
#include "GPU/Common/TextureShaderCommon.h"
26
#include "GPU/GLES/DrawEngineGLES.h"
27
#include "GPU/GLES/FragmentTestCacheGLES.h"
28
29
class ShaderManagerGLES;
30
class TextureCacheGLES;
31
class FramebufferManagerGLES;
32
class LinkedShader;
33
34
class GPU_GLES : public GPUCommonHW {
35
public:
36
GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
37
~GPU_GLES();
38
39
// This gets called on startup and when we get back from settings.
40
u32 CheckGPUFeatures() const override;
41
42
void GetStats(char *buffer, size_t bufsize) override;
43
44
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
45
void DeviceRestore(Draw::DrawContext *draw) override;
46
47
void BeginHostFrame() override;
48
void EndHostFrame() override;
49
50
protected:
51
void FinishDeferred() override;
52
53
private:
54
void BuildReportingInfo() override;
55
56
FramebufferManagerGLES *framebufferManagerGL_;
57
TextureCacheGLES *textureCacheGL_;
58
DrawEngineGLES drawEngine_;
59
FragmentTestCacheGLES fragmentTestCache_;
60
ShaderManagerGLES *shaderManagerGL_;
61
62
Path shaderCachePath_;
63
};
64
65