1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 09:07:35 +00:00

LibGL+LibGPU+LibSoftGPU: Report texture env add extension

The Quake 3 port makes use of this extension to determine a more
efficient multitexturing strategy. Since LibSoftGPU supports it, let's
report the extension in LibGL. :^)
This commit is contained in:
Jelle Raaijmakers 2022-08-29 00:10:04 +02:00 committed by Linus Groh
parent adf85c719a
commit 94f016b363
3 changed files with 7 additions and 0 deletions

View file

@ -933,6 +933,11 @@ void GLContext::build_extension_string()
if (m_device_info.num_texture_units > 1) if (m_device_info.num_texture_units > 1)
extensions.append("GL_ARB_multitexture"sv); extensions.append("GL_ARB_multitexture"sv);
if (m_device_info.supports_texture_env_add) {
extensions.append("GL_ARB_texture_env_add"sv);
extensions.append("GL_EXT_texture_env_add"sv);
}
m_extensions = String::join(' ', extensions); m_extensions = String::join(' ', extensions);
} }

View file

@ -18,6 +18,7 @@ struct DeviceInfo final {
unsigned max_clip_planes; unsigned max_clip_planes;
u8 stencil_bits; u8 stencil_bits;
bool supports_npot_textures; bool supports_npot_textures;
bool supports_texture_env_add;
}; };
} }

View file

@ -835,6 +835,7 @@ GPU::DeviceInfo Device::info() const
.max_clip_planes = MAX_CLIP_PLANES, .max_clip_planes = MAX_CLIP_PLANES,
.stencil_bits = sizeof(GPU::StencilType) * 8, .stencil_bits = sizeof(GPU::StencilType) * 8,
.supports_npot_textures = true, .supports_npot_textures = true,
.supports_texture_env_add = true,
}; };
} }