//
// sub_1005EA790 from 0x1005ea790 to 0x1005ea837 (167 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall sub_1005EA790(__int64 a1, const GLvoid *a2, unsigned int a3, int a4)
{
__int64 v6; // r13
GLuint v7; // esi
GLuint *v8; // r12
v6 = a4;
v7 = *(_DWORD *)(a1 + 4LL * a4);
if ( *(_DWORD *)(a1 + 4LL * a4 + 16) >= a3 )
{
glBindBuffer(0x8892u, v7);
glBufferSubData(0x8892u, 0, a3, a2);
}
else
{
v8 = (GLuint *)(a1 + 4LL * a4);
if ( v7 )
glDeleteBuffers(1, v8);
glGenBuffers(1, v8);
*(_DWORD *)(a1 + 4 * v6 + 16) = a3;
glBindBuffer(0x8892u, *(_DWORD *)(a1 + 4 * v6));
glBufferData(0x8892u, a3, a2, 0x88E8u);
}
}