From 043afc4e3dcf35dbabbcb42a40db41de733e536a Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 25 Jul 2023 18:56:38 +0200 Subject: [PATCH] source/GfxDriver/OpenGL/OpenGLDrv.h: Adding createShaderProgram() --- source/GfxDriver/OpenGL/OpenGLDrv.cpp | 5 +++++ source/GfxDriver/OpenGL/OpenGLDrv.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/source/GfxDriver/OpenGL/OpenGLDrv.cpp b/source/GfxDriver/OpenGL/OpenGLDrv.cpp index f313608..312bf3c 100644 --- a/source/GfxDriver/OpenGL/OpenGLDrv.cpp +++ b/source/GfxDriver/OpenGL/OpenGLDrv.cpp @@ -1,5 +1,6 @@ #include "OpenGLDrv.h" +#include #include namespace sp { @@ -60,4 +61,8 @@ void OpenGLDrv::clearColorBuffer() glClear(GL_COLOR_BUFFER_BIT); } +ShaderProgram* OpenGLDrv::createShaderProgram() { + return new OpenGLShaderProgram(); +} + } // namespace sp diff --git a/source/GfxDriver/OpenGL/OpenGLDrv.h b/source/GfxDriver/OpenGL/OpenGLDrv.h index 583d695..6f81f14 100644 --- a/source/GfxDriver/OpenGL/OpenGLDrv.h +++ b/source/GfxDriver/OpenGL/OpenGLDrv.h @@ -6,6 +6,8 @@ namespace sp { +class ShaderProgram; + class OpenGLDrv : public GfxDriver { public: @@ -24,6 +26,8 @@ public: virtual void clearBuffer(GfxDriver::BufferFlags flags); virtual void clearColorBuffer(); + + virtual ShaderProgram* createShaderProgram(); }; } // namespace sp