| 1316 | } |
| 1317 | |
| 1318 | void lazyDisableVertexAttribArray(GLuint index) |
| 1319 | { |
| 1320 | if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) ) |
| 1321 | { |
| 1322 | if (index >= 64) |
| 1323 | { |
| 1324 | // On WebGL platform calling out to WebGL API is detrimental to performance, so optimize |
| 1325 | // out redundant API calls to glEnable/DisableVertexAttribArray. |
| 1326 | GL_CHECK(glDisableVertexAttribArray(index) ); |
| 1327 | return; |
| 1328 | } |
| 1329 | |
| 1330 | const uint64_t mask = UINT64_C(1) << index; |
| 1331 | s_vertexAttribArraysPendingDisable |= mask & s_currentlyEnabledVertexAttribArrays; |
| 1332 | s_vertexAttribArraysPendingEnable &= ~mask; |
| 1333 | } |
| 1334 | else |
| 1335 | { |
| 1336 | GL_CHECK(glDisableVertexAttribArray(index) ); |
| 1337 | } |
| 1338 | } |
| 1339 | |
| 1340 | void applyLazyEnabledVertexAttributes() |
| 1341 | { |
no outgoing calls
no test coverage detected