mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Support OpenGL 3 (#13321)
This commit is contained in:
@@ -292,15 +292,16 @@ std::vector<video::E_DRIVER_TYPE> RenderingEngine::getSupportedVideoDrivers()
|
||||
// Order by preference (best first)
|
||||
static const video::E_DRIVER_TYPE glDrivers[] = {
|
||||
video::EDT_OPENGL,
|
||||
video::EDT_OPENGL3,
|
||||
video::EDT_OGLES2,
|
||||
video::EDT_OGLES1,
|
||||
video::EDT_NULL,
|
||||
};
|
||||
std::vector<video::E_DRIVER_TYPE> drivers;
|
||||
|
||||
for (u32 i = 0; i < ARRLEN(glDrivers); i++) {
|
||||
if (IrrlichtDevice::isDriverSupported(glDrivers[i]))
|
||||
drivers.push_back(glDrivers[i]);
|
||||
for (video::E_DRIVER_TYPE driver: glDrivers) {
|
||||
if (IrrlichtDevice::isDriverSupported(driver))
|
||||
drivers.push_back(driver);
|
||||
}
|
||||
|
||||
return drivers;
|
||||
@@ -328,6 +329,7 @@ const VideoDriverInfo &RenderingEngine::getVideoDriverInfo(irr::video::E_DRIVER_
|
||||
static const std::unordered_map<int, VideoDriverInfo> driver_info_map = {
|
||||
{(int)video::EDT_NULL, {"null", "NULL Driver"}},
|
||||
{(int)video::EDT_OPENGL, {"opengl", "OpenGL"}},
|
||||
{(int)video::EDT_OPENGL3, {"opengl3", "OpenGL 3+"}},
|
||||
{(int)video::EDT_OGLES1, {"ogles1", "OpenGL ES1"}},
|
||||
{(int)video::EDT_OGLES2, {"ogles2", "OpenGL ES2"}},
|
||||
};
|
||||
|
Reference in New Issue
Block a user