mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
LibGL: Add stubs for multitexturing and announce GL_ARB_multitexture
This makes glquake recognize multitexture support and choose the multitexture rendering path.
This commit is contained in:
parent
716b53e90f
commit
044582b0ce
Notes:
sideshowbarker
2024-07-17 20:39:15 +09:00
Author: https://github.com/sunverwerth
Commit: 044582b0ce
Pull-request: https://github.com/SerenityOS/serenity/pull/11927
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/gmta ✅
6 changed files with 44 additions and 1 deletions
|
@ -621,7 +621,6 @@ void SoftwareGLContext::gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w
|
|||
m_vertex_list.append(vertex);
|
||||
}
|
||||
|
||||
// FIXME: We need to add `r` and `q` to our GLVertex?!
|
||||
void SoftwareGLContext::gl_tex_coord(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_tex_coord, s, t, r, q);
|
||||
|
@ -629,6 +628,13 @@ void SoftwareGLContext::gl_tex_coord(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
|
|||
m_current_vertex_tex_coord = { s, t, r, q };
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_multi_tex_coord(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_multi_tex_coord, target, s, t, r, q);
|
||||
|
||||
m_current_vertex_tex_coord = { s, t, r, q };
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_viewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_viewport, x, y, width, height);
|
||||
|
@ -2031,6 +2037,11 @@ void SoftwareGLContext::gl_disable_client_state(GLenum cap)
|
|||
}
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_client_active_texture(GLenum target)
|
||||
{
|
||||
(void)target;
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_vertex_pointer(GLint size, GLenum type, GLsizei stride, const void* pointer)
|
||||
{
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
|
@ -3264,6 +3275,9 @@ void SoftwareGLContext::build_extension_string()
|
|||
if (m_device_info.supports_npot_textures)
|
||||
extensions.append("GL_ARB_texture_non_power_of_two");
|
||||
|
||||
if (m_device_info.num_texture_units > 1)
|
||||
extensions.append("GL_ARB_multitexture");
|
||||
|
||||
m_extensions = String::join(" ", extensions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue