MCPcopy Create free account
hub / github.com/comaps/comaps / Map

Method Map

libs/drape/gpu_buffer.cpp:88–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void * GPUBuffer::Map(uint32_t elementOffset, uint32_t elementCount)
89{
90#ifdef DEBUG
91 ASSERT(!m_isMapped, ());
92 m_isMapped = true;
93#endif
94
95 if (!IsMapBufferSupported())
96 {
97 m_mappingOffset = elementOffset;
98 return nullptr;
99 }
100 m_mappingOffset = 0;
101 uint32_t const elementSize = GetElementSize();
102 uint32_t const byteOffset = elementOffset * elementSize;
103 uint32_t const byteCount = elementCount * elementSize;
104 return GLFunctions::glMapBufferRange(glTarget(m_t), byteOffset, byteCount, gl_const::GLWriteBufferBit);
105}
106
107void GPUBuffer::UpdateData(void * gpuPtr, void const * data, uint32_t elementOffset, uint32_t elementCount)
108{

Callers 3

LoadMethod · 0.45
GetMemoryRegionForTagFunction · 0.45
DataBufferMapperMethod · 0.45

Calls 3

ASSERTFunction · 0.85
IsMapBufferSupportedFunction · 0.85
glTargetFunction · 0.85

Tested by

no test coverage detected