| 4648 | } |
| 4649 | |
| 4650 | void WrappedOpenGL::glBindVertexArray(GLuint array) |
| 4651 | { |
| 4652 | SERIALISE_TIME_CALL(GL.glBindVertexArray(array)); |
| 4653 | |
| 4654 | GLResourceRecord *record = NULL; |
| 4655 | |
| 4656 | if(IsCaptureMode(m_State)) |
| 4657 | { |
| 4658 | ContextData &cd = GetCtxData(); |
| 4659 | |
| 4660 | if(array == 0) |
| 4661 | { |
| 4662 | cd.m_VertexArrayRecord = record = NULL; |
| 4663 | |
| 4664 | cd.m_BufferRecord[BufferIdx(eGL_ELEMENT_ARRAY_BUFFER)] = NULL; |
| 4665 | } |
| 4666 | else |
| 4667 | { |
| 4668 | cd.m_VertexArrayRecord = record = |
| 4669 | GetResourceManager()->GetResourceRecord(VertexArrayRes(GetCtx(), array)); |
| 4670 | |
| 4671 | GLuint buffer = 0; |
| 4672 | GL.glGetIntegerv(eGL_ELEMENT_ARRAY_BUFFER_BINDING, (GLint *)&buffer); |
| 4673 | |
| 4674 | cd.m_BufferRecord[BufferIdx(eGL_ELEMENT_ARRAY_BUFFER)] = |
| 4675 | GetResourceManager()->GetResourceRecord(BufferRes(GetCtx(), buffer)); |
| 4676 | } |
| 4677 | } |
| 4678 | |
| 4679 | if(IsActiveCapturing(m_State)) |
| 4680 | { |
| 4681 | USE_SCRATCH_SERIALISER(); |
| 4682 | SCOPED_SERIALISE_CHUNK(gl_CurChunk); |
| 4683 | Serialise_glBindVertexArray(ser, array); |
| 4684 | |
| 4685 | GetContextRecord()->AddChunk(scope.Get()); |
| 4686 | if(record) |
| 4687 | GetResourceManager()->MarkVAOReferenced(record->Resource, eFrameRef_ReadBeforeWrite); |
| 4688 | } |
| 4689 | } |
| 4690 | |
| 4691 | template <typename SerialiserType> |
| 4692 | bool WrappedOpenGL::Serialise_glVertexArrayElementBuffer(SerialiserType &ser, GLuint vaobjHandle, |
no test coverage detected