mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:38:10 +00:00
LibGL: Make GLsizeiptr
signed
The Khronos description of a "non-negative binary integer" does not mean an unsigned type, just that it should not be negative.
This commit is contained in:
parent
e7627af555
commit
62092a329d
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ void GLContext::gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr si
|
||||||
|
|
||||||
auto& target_buffer = target == GL_ELEMENT_ARRAY_BUFFER ? m_element_array_buffer : m_array_buffer;
|
auto& target_buffer = target == GL_ELEMENT_ARRAY_BUFFER ? m_element_array_buffer : m_array_buffer;
|
||||||
RETURN_WITH_ERROR_IF(!target_buffer, GL_INVALID_OPERATION);
|
RETURN_WITH_ERROR_IF(!target_buffer, GL_INVALID_OPERATION);
|
||||||
RETURN_WITH_ERROR_IF((offset + size) > target_buffer->size(), GL_INVALID_VALUE);
|
RETURN_WITH_ERROR_IF(static_cast<size_t>(offset + size) > target_buffer->size(), GL_INVALID_VALUE);
|
||||||
|
|
||||||
target_buffer->replace_data(data, offset, size);
|
target_buffer->replace_data(data, offset, size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ typedef long GLintptr;
|
||||||
typedef unsigned int GLuint;
|
typedef unsigned int GLuint;
|
||||||
typedef int GLfixed;
|
typedef int GLfixed;
|
||||||
typedef int GLsizei;
|
typedef int GLsizei;
|
||||||
typedef unsigned long GLsizeiptr;
|
typedef long GLsizeiptr;
|
||||||
typedef void GLvoid;
|
typedef void GLvoid;
|
||||||
typedef float GLfloat;
|
typedef float GLfloat;
|
||||||
typedef double GLclampd;
|
typedef double GLclampd;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue