//
// sub_1006BD820 from 0x1006bd820 to 0x1006bd8c7 (167 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:35:30 +0000
//
void __fastcall sub_1006BD820(__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);
}
}