Add GlContext base class for MapContext

This commit is contained in:
Dan Paulat 2022-10-02 23:44:09 -05:00
parent a45e996872
commit d84a618d3d
7 changed files with 115 additions and 57 deletions

View 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