MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Clear

Method Clear

engine/PoseidonGL33/EngineGL33_VertexBuffer.cpp:348–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void EngineGL33::Clear(bool clearZ, bool clear, PackedColor color)
349{
350 if (!_glContext)
351 return;
352 GLbitfield mask = 0;
353 if (clear)
354 {
355 float r = ((color >> 16) & 0xFF) / 255.0f;
356 float g = ((color >> 8) & 0xFF) / 255.0f;
357 float b = (color & 0xFF) / 255.0f;
358 float a = ((color >> 24) & 0xFF) / 255.0f;
359 Poseidon::render::pipeline::SetClearColor(r, g, b, a);
360 mask |= GL_COLOR_BUFFER_BIT;
361 }
362 if (clearZ)
363 {
364 mask |= GL_DEPTH_BUFFER_BIT;
365 if (_hasStencilBuffer)
366 mask |= GL_STENCIL_BUFFER_BIT;
367 }
368 Poseidon::render::clear::WithMask(mask);
369}
370
371void EngineGL33::ReportGRAM(const char*) {}
372

Callers 8

~TextBankGL33Method · 0.45
VerifyChecksumsMethod · 0.45
FlushQueueMethod · 0.45
FreeAllQueuesMethod · 0.45
ListMonitorsMethod · 0.45
ListResolutionsMethod · 0.45
ListRefreshRatesMethod · 0.45
ShutdownGLMethod · 0.45

Calls 2

SetClearColorFunction · 0.85
WithMaskFunction · 0.85

Tested by

no test coverage detected