aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/video_core/renderer_opengl/gl_resource_manager.h
blob: 975720d0ab850368e06fe8cdc967303b460792e3 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright 2015 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include "common/common_types.h"

#include "generated/gl_3_2_core.h"

class OGLTexture : public NonCopyable {
public:
    OGLTexture();
    ~OGLTexture();

    /// Creates a new internal OpenGL resource and stores the handle
    void Create();

    /// Deletes the internal OpenGL resource
    void Release();

    GLuint handle;
};

class OGLShader : public NonCopyable {
public:
    OGLShader();
    ~OGLShader();

    /// Creates a new internal OpenGL resource and stores the handle
    void Create(const char* vert_shader, const char* frag_shader);

    /// Deletes the internal OpenGL resource
    void Release();

    GLuint handle;
};

class OGLBuffer : public NonCopyable {
public:
    OGLBuffer();
    ~OGLBuffer();

    /// Creates a new internal OpenGL resource and stores the handle
    void Create();

    /// Deletes the internal OpenGL resource
    void Release();

    GLuint handle;
};

class OGLVertexArray : public NonCopyable {
public:
    OGLVertexArray();
    ~OGLVertexArray();

    /// Creates a new internal OpenGL resource and stores the handle
    void Create();

    /// Deletes the internal OpenGL resource
    void Release();

    GLuint handle;
};

class OGLFramebuffer : public NonCopyable {
public:
    OGLFramebuffer();
    ~OGLFramebuffer();

    /// Creates a new internal OpenGL resource and stores the handle
    void Create();

    /// Deletes the internal OpenGL resource
    void Release();

    GLuint handle;
};