Split new GL3/GLES2 drivers

The classes are tiny wrappers currently but should they be customized, they are there
This commit is contained in:
numzero
2023-03-03 20:29:36 +03:00
parent 2932065346
commit 8dd8652f5f
13 changed files with 226 additions and 124 deletions

View File

@ -0,0 +1,22 @@
// Copyright (C) 2023 Vitaliy Lobachevskiy
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "Driver.h"
namespace irr {
namespace video {
E_DRIVER_TYPE COpenGL3Driver::getDriverType() const {
return EDT_OPENGL3;
}
IVideoDriver* createOpenGL3Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager)
{
COpenGL3Driver* driver = new COpenGL3Driver(params, io, contextManager);
driver->genericDriverInit(params.WindowSize, params.Stencilbuffer); // don't call in constructor, it uses virtual function calls of driver
return driver;
}
}
}

View File

@ -0,0 +1,19 @@
// Copyright (C) 2023 Vitaliy Lobachevskiy
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#pragma once
#include "OpenGL/Driver.h"
namespace irr {
namespace video {
class COpenGL3Driver : public COpenGL3DriverBase {
friend IVideoDriver* createOpenGL3Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);
public:
using COpenGL3DriverBase::COpenGL3DriverBase;
E_DRIVER_TYPE getDriverType() const override;
};
}
}