Implement OpenGL from window-starter
The bulk of the work to create an OpenGL context on windows and load the some of the functions required to get a triangle rendering using modern OpenGL
This commit is contained in:
25
src/platform/null_opengl.cpp
Normal file
25
src/platform/null_opengl.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "../opengl.h"
|
||||
|
||||
namespace ogl_starter
|
||||
{
|
||||
class NullOpenGLImpl final : public OpenGL
|
||||
{
|
||||
public:
|
||||
~NullOpenGLImpl() override = default;
|
||||
NullOpenGLImpl(const NullOpenGLImpl&) = delete;
|
||||
NullOpenGLImpl& operator=(const NullOpenGLImpl&) = delete;
|
||||
|
||||
NullOpenGLImpl(NullOpenGLImpl&&) = default;
|
||||
NullOpenGLImpl& operator=(NullOpenGLImpl&&) = default;
|
||||
|
||||
void ClearBuffers() override {}
|
||||
void SwapBuffers() override {}
|
||||
void DrawScene() override {}
|
||||
};
|
||||
} // namespace ogl_starter
|
||||
|
||||
std::unique_ptr<ogl_starter::Window> oglsCreateWindow(ogl_starter::OpenGLCreateParams)
|
||||
{
|
||||
auto result = std::make_unique<ogl_starter::NullOpenGLImpl>();
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user