From 44f7c22bbf0eef69a0190d7325306b0cbe1b1fdf Mon Sep 17 00:00:00 2001 From: numzero Date: Sun, 16 Apr 2023 01:03:33 +0300 Subject: [PATCH] OpenGL3: Version asserts --- source/Irrlicht/OpenGL3/Driver.cpp | 4 +--- source/Irrlicht/OpenGLES2/Driver.cpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/OpenGL3/Driver.cpp b/source/Irrlicht/OpenGL3/Driver.cpp index 7f63a45a..e3d7714c 100644 --- a/source/Irrlicht/OpenGL3/Driver.cpp +++ b/source/Irrlicht/OpenGL3/Driver.cpp @@ -29,9 +29,7 @@ namespace video { void COpenGL3Driver::initFeatures() { assert (Version.Spec == OpenGLSpec::Compat); - assert (Version.Major >= 3); - if (Version.Major == 3) - assert (Version.Minor >= 2); + assert (isVersionAtLeast(3, 2)); initExtensionsNew(); // COGLESCoreExtensionHandler::Feature diff --git a/source/Irrlicht/OpenGLES2/Driver.cpp b/source/Irrlicht/OpenGLES2/Driver.cpp index 714a9da3..0055bd8a 100644 --- a/source/Irrlicht/OpenGLES2/Driver.cpp +++ b/source/Irrlicht/OpenGLES2/Driver.cpp @@ -23,6 +23,7 @@ namespace video { } void COpenGLES2Driver::initFeatures() { + assert (Version.Spec == OpenGLSpec::ES); assert (Version.Major >= 2); if (Version.Major >= 3) initExtensionsNew();