MCPcopy Create free account
hub / github.com/baldurk/renderdoc / glBindVertexArray

Method glBindVertexArray

renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp:4650–4689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4648}
4649
4650void 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
4691template <typename SerialiserType>
4692bool WrappedOpenGL::Serialise_glVertexArrayElementBuffer(SerialiserType &ser, GLuint vaobjHandle,

Callers 15

DoVendorChecksFunction · 0.45
PopMethod · 0.45
ApplyStateMethod · 0.45
RenderOverlayMethod · 0.45
RenderTextureInternalMethod · 0.45
InitOutputWindowMethod · 0.45
CreateDebugDataMethod · 0.45
RenderTextInternalMethod · 0.45
Apply_InitialStateMethod · 0.45

Calls 10

IsCaptureModeFunction · 0.85
BufferIdxFunction · 0.85
VertexArrayResFunction · 0.85
BufferResFunction · 0.85
IsActiveCapturingFunction · 0.85
AddChunkMethod · 0.80
MarkVAOReferencedMethod · 0.80
GetResourceRecordMethod · 0.45
glGetIntegervMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected