mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGL: Generate GL_OUT_OF_MEMORY error in glBufferData
when OOM
This commit is contained in:
parent
54abfcf835
commit
f76c7f3788
Notes:
sideshowbarker
2024-07-17 03:41:43 +09:00
Author: https://github.com/mkanilsson 🔰 Commit: https://github.com/SerenityOS/serenity/commit/f76c7f3788 Pull-request: https://github.com/SerenityOS/serenity/pull/16342 Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 2 deletions
|
@ -51,8 +51,7 @@ void GLContext::gl_buffer_data(GLenum target, GLsizeiptr size, void const* data,
|
|||
auto& target_buffer = target == GL_ELEMENT_ARRAY_BUFFER ? m_element_array_buffer : m_array_buffer;
|
||||
RETURN_WITH_ERROR_IF(!target_buffer, GL_INVALID_OPERATION);
|
||||
|
||||
// FIXME: Report GL_OUT_OF_MEMORY or other errors as needed here
|
||||
MUST(target_buffer->set_data(data, size));
|
||||
RETURN_WITH_ERROR_IF(target_buffer->set_data(data, size).is_error(), GL_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
void GLContext::gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr size, void const* data)
|
||||
|
|
Loading…
Reference in a new issue