mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Backend/DirectGLES): properly sync integer vertex pointer
This commit is contained in:
@@ -177,10 +177,16 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
|
|
||||||
backendBufferObject->Bind(GL_ARRAY_BUFFER);
|
backendBufferObject->Bind(GL_ARRAY_BUFFER);
|
||||||
MG_External::GLES::glEnableVertexAttribArray(attribIndex);
|
MG_External::GLES::glEnableVertexAttribArray(attribIndex);
|
||||||
MG_External::GLES::glVertexAttribPointer(
|
if (!attrib.IsInteger) {
|
||||||
attribIndex, attrib.Size, MG_Util::ConvertDataTypeToGLEnum(attrib.Type),
|
MG_External::GLES::glVertexAttribPointer(
|
||||||
attrib.Normalized ? GL_TRUE : GL_FALSE, attrib.Stride,
|
attribIndex, attrib.Size, MG_Util::ConvertDataTypeToGLEnum(attrib.Type),
|
||||||
reinterpret_cast<const void*>(static_cast<SizeT>(attrib.Offset)));
|
attrib.Normalized ? GL_TRUE : GL_FALSE,
|
||||||
|
attrib.Stride, (const void *)attrib.Offset);
|
||||||
|
} else {
|
||||||
|
MG_External::GLES::glVertexAttribIPointer(
|
||||||
|
attribIndex, attrib.Size, MG_Util::ConvertDataTypeToGLEnum(attrib.Type),
|
||||||
|
attrib.Stride, (const void *)attrib.Offset);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: divisor
|
// TODO: divisor
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user