mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
LibGL: Clean up reading floats and doubles from pointers
No functional changes, just removal of superfluous braces.
This commit is contained in:
parent
4450aef175
commit
c91e86e020
1 changed files with 2 additions and 4 deletions
|
@ -2467,18 +2467,16 @@ void SoftwareGLContext::read_from_vertex_attribute_pointer(VertexAttribPointer c
|
|||
if (stride == 0)
|
||||
stride = sizeof(GLfloat) * attrib.size;
|
||||
|
||||
for (int i = 0; i < attrib.size; i++) {
|
||||
for (int i = 0; i < attrib.size; i++)
|
||||
elements[i] = *(reinterpret_cast<const GLfloat*>(byte_ptr + stride * index) + i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GL_DOUBLE: {
|
||||
if (stride == 0)
|
||||
stride = sizeof(GLdouble) * attrib.size;
|
||||
|
||||
for (int i = 0; i < attrib.size; i++) {
|
||||
for (int i = 0; i < attrib.size; i++)
|
||||
elements[i] = static_cast<float>(*(reinterpret_cast<const GLdouble*>(byte_ptr + stride * index) + i));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue