mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Fix] (MG_Backend/DirectGLES): Always bind VBO before glVertexAttribPointer.
This commit is contained in:
@@ -264,9 +264,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
m_syncedAttributeVersions[attribIndex].BufferVersion;
|
m_syncedAttributeVersions[attribIndex].BufferVersion;
|
||||||
if (!needsSyncFormat && !needsSyncBuffer) continue;
|
if (!needsSyncFormat && !needsSyncBuffer) continue;
|
||||||
|
|
||||||
if (needsSyncBuffer) {
|
SyncAttributeBuffer(attribIndex,
|
||||||
SyncAttributeBuffer(attribIndex, attrib);
|
attrib); // Always need to bind VBO before setting glVertexAttribPointer
|
||||||
}
|
|
||||||
|
|
||||||
if (needsSyncFormat) {
|
if (needsSyncFormat) {
|
||||||
MG_External::GLES::glVertexAttribDivisor(attribIndex, attrib.Divisor);
|
MG_External::GLES::glVertexAttribDivisor(attribIndex, attrib.Divisor);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace MobileGL {
|
|||||||
void VertexArrayObject::EnableAttribute(Uint index) {
|
void VertexArrayObject::EnableAttribute(Uint index) {
|
||||||
if (index >= MAX_VERTEX_ATTRIBS) return;
|
if (index >= MAX_VERTEX_ATTRIBS) return;
|
||||||
|
|
||||||
if (!m_attributes[index].Enabled) return;
|
if (m_attributes[index].Enabled) return;
|
||||||
|
|
||||||
m_attributes[index].Enabled = true;
|
m_attributes[index].Enabled = true;
|
||||||
BumpAttributeSwitchVersion(index);
|
BumpAttributeSwitchVersion(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user