mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Split new GL3/GLES2 drivers
The classes are tiny wrappers currently but should they be customized, they are there
This commit is contained in:
22
source/Irrlicht/OpenGLES2/Driver.cpp
Normal file
22
source/Irrlicht/OpenGLES2/Driver.cpp
Normal 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 COpenGLES2Driver::getDriverType() const {
|
||||
return EDT_OGLES2;
|
||||
}
|
||||
|
||||
IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager)
|
||||
{
|
||||
COpenGLES2Driver* driver = new COpenGLES2Driver(params, io, contextManager);
|
||||
driver->genericDriverInit(params.WindowSize, params.Stencilbuffer); // don't call in constructor, it uses virtual function calls of driver
|
||||
return driver;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
19
source/Irrlicht/OpenGLES2/Driver.h
Normal file
19
source/Irrlicht/OpenGLES2/Driver.h
Normal 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 COpenGLES2Driver : public COpenGL3DriverBase {
|
||||
friend IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);
|
||||
public:
|
||||
using COpenGL3DriverBase::COpenGL3DriverBase;
|
||||
E_DRIVER_TYPE getDriverType() const override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user