mirror of
https://github.com/minetest/minetest.git
synced 2025-01-08 14:27:31 +01:00
Prefer GL3 driver over legacy GL driver
This commit is contained in:
parent
83bc27d99d
commit
9f52f84f2b
@ -135,7 +135,7 @@ static irr::IrrlichtDevice *createDevice(SIrrlichtCreationParameters params, std
|
|||||||
{
|
{
|
||||||
if (requested_driver) {
|
if (requested_driver) {
|
||||||
params.DriverType = *requested_driver;
|
params.DriverType = *requested_driver;
|
||||||
verbosestream << "Trying video driver " << getVideoDriverName(params.DriverType) << std::endl;
|
infostream << "Trying video driver " << getVideoDriverName(params.DriverType) << std::endl;
|
||||||
if (auto *device = createDeviceEx(params))
|
if (auto *device = createDeviceEx(params))
|
||||||
return device;
|
return device;
|
||||||
errorstream << "Failed to initialize the " << getVideoDriverName(params.DriverType) << " video driver" << std::endl;
|
errorstream << "Failed to initialize the " << getVideoDriverName(params.DriverType) << " video driver" << std::endl;
|
||||||
@ -147,7 +147,7 @@ static irr::IrrlichtDevice *createDevice(SIrrlichtCreationParameters params, std
|
|||||||
if (fallback_driver == video::EDT_NULL || fallback_driver == requested_driver)
|
if (fallback_driver == video::EDT_NULL || fallback_driver == requested_driver)
|
||||||
continue;
|
continue;
|
||||||
params.DriverType = fallback_driver;
|
params.DriverType = fallback_driver;
|
||||||
verbosestream << "Trying video driver " << getVideoDriverName(params.DriverType) << std::endl;
|
infostream << "Trying video driver " << getVideoDriverName(params.DriverType) << std::endl;
|
||||||
if (auto *device = createDeviceEx(params))
|
if (auto *device = createDeviceEx(params))
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
@ -374,16 +374,16 @@ void RenderingEngine::draw_load_screen(const std::wstring &text,
|
|||||||
std::vector<video::E_DRIVER_TYPE> RenderingEngine::getSupportedVideoDrivers()
|
std::vector<video::E_DRIVER_TYPE> RenderingEngine::getSupportedVideoDrivers()
|
||||||
{
|
{
|
||||||
// Only check these drivers. We do not support software and D3D in any capacity.
|
// Only check these drivers. We do not support software and D3D in any capacity.
|
||||||
// Order by preference (best first)
|
// ordered by preference (best first)
|
||||||
static const video::E_DRIVER_TYPE glDrivers[] = {
|
static const video::E_DRIVER_TYPE glDrivers[] = {
|
||||||
video::EDT_OPENGL,
|
|
||||||
video::EDT_OPENGL3,
|
video::EDT_OPENGL3,
|
||||||
|
video::EDT_OPENGL,
|
||||||
video::EDT_OGLES2,
|
video::EDT_OGLES2,
|
||||||
video::EDT_NULL,
|
video::EDT_NULL,
|
||||||
};
|
};
|
||||||
std::vector<video::E_DRIVER_TYPE> drivers;
|
std::vector<video::E_DRIVER_TYPE> drivers;
|
||||||
|
|
||||||
for (video::E_DRIVER_TYPE driver: glDrivers) {
|
for (auto driver : glDrivers) {
|
||||||
if (IrrlichtDevice::isDriverSupported(driver))
|
if (IrrlichtDevice::isDriverSupported(driver))
|
||||||
drivers.push_back(driver);
|
drivers.push_back(driver);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user