| 1338 | } |
| 1339 | |
| 1340 | void applyLazyEnabledVertexAttributes() |
| 1341 | { |
| 1342 | if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) ) |
| 1343 | { |
| 1344 | while (s_vertexAttribArraysPendingDisable) |
| 1345 | { |
| 1346 | uint32_t index = bx::countTrailingZeros(s_vertexAttribArraysPendingDisable); |
| 1347 | uint64_t mask = ~(UINT64_C(1) << index); |
| 1348 | s_vertexAttribArraysPendingDisable &= mask; |
| 1349 | s_currentlyEnabledVertexAttribArrays &= mask; |
| 1350 | GL_CHECK(glDisableVertexAttribArray(index) ); |
| 1351 | } |
| 1352 | |
| 1353 | while (s_vertexAttribArraysPendingEnable) |
| 1354 | { |
| 1355 | uint32_t index = bx::countTrailingZeros(s_vertexAttribArraysPendingEnable); |
| 1356 | uint64_t mask = UINT64_C(1) << index; |
| 1357 | s_vertexAttribArraysPendingEnable &= ~mask; |
| 1358 | s_currentlyEnabledVertexAttribArrays |= mask; |
| 1359 | GL_CHECK(glEnableVertexAttribArray(index) ); |
| 1360 | } |
| 1361 | } |
| 1362 | } |
| 1363 | |
| 1364 | void setTextureFormat(TextureFormat::Enum _format, GLenum _internalFmt, GLenum _fmt, GLenum _type = GL_ZERO) |
| 1365 | { |