mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Support OpenGL 3 (#13321)
This commit is contained in:
parent
9cca12ff0b
commit
8093044f07
10 changed files with 26 additions and 22 deletions
|
@ -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"}},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue