mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibGL: Add Texture Name Allocation
Texture names can now be allocated via `glGenTextures` and deallocated via `glDeleteTextures`.
This commit is contained in:
parent
8a69e6714e
commit
21dff6d40b
Notes:
sideshowbarker
2024-07-18 17:22:18 +09:00
Author: https://github.com/Quaker762
Commit: 21dff6d40b
Pull-request: https://github.com/SerenityOS/serenity/pull/7024
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/ccapitalK
Reviewed-by: https://github.com/predmond
Reviewed-by: https://github.com/sunverwerth
8 changed files with 118 additions and 0 deletions
|
@ -742,6 +742,36 @@ void SoftwareGLContext::gl_disable(GLenum capability)
|
|||
m_rasterizer.set_options(rasterizer_options);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_gen_textures(GLsizei n, GLuint* textures)
|
||||
{
|
||||
if (n < 0) {
|
||||
m_error = GL_INVALID_VALUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_in_draw_state) {
|
||||
m_error = GL_INVALID_OPERATION;
|
||||
return;
|
||||
}
|
||||
|
||||
m_name_allocator.allocate(n, textures);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_delete_textures(GLsizei n, const GLuint* textures)
|
||||
{
|
||||
if (n < 0) {
|
||||
m_error = GL_INVALID_VALUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_in_draw_state) {
|
||||
m_error = GL_INVALID_OPERATION;
|
||||
return;
|
||||
}
|
||||
|
||||
m_name_allocator.free(n, textures);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_front_face(GLenum face)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_front_face, face);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue