From 05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 Mon Sep 17 00:00:00 2001 From: tfarley Date: Mon, 18 May 2015 21:21:33 -0700 Subject: OpenGL renderer --- .../renderer_opengl/gl_resource_manager.h | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/video_core/renderer_opengl/gl_resource_manager.h (limited to 'src/video_core/renderer_opengl/gl_resource_manager.h') diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h new file mode 100644 index 00000000..975720d0 --- /dev/null +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -0,0 +1,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; +}; -- cgit v1.2.3