| 45 | } |
| 46 | |
| 47 | void GLVertexArrayObject::bind(GLRenderSystemCommon* rs) |
| 48 | { |
| 49 | if(mCreatorContext && mCreatorContext != rs->_getCurrentContext()) // VAO is unusable with current context, destroy it |
| 50 | { |
| 51 | if(mVAO != 0) |
| 52 | rs->_destroyVao(mCreatorContext, mVAO); |
| 53 | mCreatorContext = 0; |
| 54 | mVAO = 0; |
| 55 | mNeedsUpdate = true; |
| 56 | } |
| 57 | if(!mCreatorContext && rs->getCapabilities()->hasCapability(RSC_VAO)) // create VAO lazy or recreate after destruction |
| 58 | { |
| 59 | mCreatorContext = rs->_getCurrentContext(); |
| 60 | mVAO = rs->_createVao(); |
| 61 | mNeedsUpdate = true; |
| 62 | } |
| 63 | rs->_bindVao(mCreatorContext, mVAO); |
| 64 | } |
| 65 | |
| 66 | bool GLVertexArrayObject::needsUpdate(VertexBufferBinding* vertexBufferBinding, |
| 67 | size_t vertexStart) |
nothing calls this directly
no test coverage detected