mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +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)
|
if (stride == 0)
|
||||||
stride = sizeof(GLfloat) * attrib.size;
|
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);
|
elements[i] = *(reinterpret_cast<const GLfloat*>(byte_ptr + stride * index) + i);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GL_DOUBLE: {
|
case GL_DOUBLE: {
|
||||||
if (stride == 0)
|
if (stride == 0)
|
||||||
stride = sizeof(GLdouble) * attrib.size;
|
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));
|
elements[i] = static_cast<float>(*(reinterpret_cast<const GLdouble*>(byte_ptr + stride * index) + i));
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue