mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:20:06 +00:00
Add GlContext base class for MapContext
This commit is contained in:
parent
a45e996872
commit
d84a618d3d
7 changed files with 115 additions and 57 deletions
39
scwx-qt/source/scwx/qt/gl/gl_context.hpp
Normal file
39
scwx-qt/source/scwx/qt/gl/gl_context.hpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/qt/gl/gl.hpp>
|
||||
#include <scwx/qt/gl/shader_program.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace gl
|
||||
{
|
||||
|
||||
class GlContext
|
||||
{
|
||||
public:
|
||||
explicit GlContext();
|
||||
virtual ~GlContext();
|
||||
|
||||
GlContext(const GlContext&) = delete;
|
||||
GlContext& operator=(const GlContext&) = delete;
|
||||
|
||||
GlContext(GlContext&&) noexcept;
|
||||
GlContext& operator=(GlContext&&) noexcept;
|
||||
|
||||
gl::OpenGLFunctions& gl();
|
||||
|
||||
std::shared_ptr<gl::ShaderProgram>
|
||||
GetShaderProgram(const std::string& vertexPath,
|
||||
const std::string& fragmentPath);
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace gl
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue