MCPcopy Create free account
hub / github.com/crownengine/crown / begin

Method begin

3rdparty/bgfx/src/bgfx.cpp:2269–2292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2267 }
2268
2269 Encoder* Context::begin(bool _forThread)
2270 {
2271 EncoderImpl* encoder = &m_encoder[0];
2272
2273#if BGFX_CONFIG_MULTITHREADED
2274 if (_forThread || BGFX_API_THREAD_MAGIC != s_threadIndex)
2275 {
2276 bx::MutexScope scopeLock(m_encoderApiLock);
2277
2278 uint16_t idx = m_encoderHandle->alloc();
2279 if (kInvalidHandle == idx)
2280 {
2281 return NULL;
2282 }
2283
2284 encoder = &m_encoder[idx];
2285 encoder->begin(m_submit, uint8_t(idx) );
2286 }
2287#else
2288 BX_UNUSED(_forThread);
2289#endif // BGFX_CONFIG_MULTITHREADED
2290
2291 return reinterpret_cast<Encoder*>(encoder);
2292 }
2293
2294 void Context::end(Encoder* _encoder)
2295 {

Callers 15

parseInOutFunction · 0.45
compileShaderFunction · 0.45
compileFunction · 0.45
compileFunction · 0.45
initMethod · 0.45
frameMethod · 0.45
beginFunction · 0.45
invalidateMethod · 0.45
invalidateMethod · 0.45
invalidateMethod · 0.45
push_frontMethod · 0.45
pop_frontMethod · 0.45

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected