mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-09 17:23:50 +01:00
OpenGL3: Add version check helper
This commit is contained in:
parent
78d0819a2c
commit
2e477a07d1
@ -214,6 +214,14 @@ COpenGL3DriverBase::~COpenGL3DriverBase()
|
||||
Version = getVersionFromOpenGL();
|
||||
}
|
||||
|
||||
bool COpenGL3DriverBase::isVersionAtLeast(int major, int minor) const noexcept {
|
||||
if (Version.Major < major)
|
||||
return false;
|
||||
if (Version.Major > major)
|
||||
return true;
|
||||
return Version.Minor >= minor;
|
||||
}
|
||||
|
||||
bool COpenGL3DriverBase::genericDriverInit(const core::dimension2d<u32>& screenSize, bool stencilBuffer)
|
||||
{
|
||||
initVersion();
|
||||
|
@ -290,6 +290,8 @@ namespace video
|
||||
|
||||
virtual void initFeatures() = 0;
|
||||
|
||||
bool isVersionAtLeast(int major, int minor = 0) const noexcept;
|
||||
|
||||
void chooseMaterial2D();
|
||||
|
||||
ITexture* createDeviceDependentTexture(const io::path& name, IImage* image) override;
|
||||
|
Loading…
Reference in New Issue
Block a user