mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +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
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