forked from Mirrorlandia_minetest/irrlicht
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