MCPcopy Create free account
hub / github.com/ZDoom/Raze / Clear

Method Clear

source/common/rendering/gl/gl_renderstate.cpp:512–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512void FGLRenderState::Clear(int targets)
513{
514 // This always clears to default values.
515 int gltarget = 0;
516 if (targets & CT_Depth)
517 {
518 gltarget |= GL_DEPTH_BUFFER_BIT;
519 glClearDepth(1);
520 }
521 if (targets & CT_Stencil)
522 {
523 gltarget |= GL_STENCIL_BUFFER_BIT;
524 glClearStencil(0);
525 }
526 if (targets & CT_Color)
527 {
528 gltarget |= GL_COLOR_BUFFER_BIT;
529 glClearColor(screen->mSceneClearColor[0], screen->mSceneClearColor[1], screen->mSceneClearColor[2], screen->mSceneClearColor[3]);
530 }
531 glClear(gltarget);
532}
533
534void FGLRenderState::EnableStencil(bool on)
535{

Callers 8

WaitForWorkersMethod · 0.45
FlushMethod · 0.45
CopyToBackbufferMethod · 0.45
FShaderCollectionMethod · 0.45
CleanMethod · 0.45
LinkMethod · 0.45
BeginFrameMethod · 0.45
ClearEyeBuffersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected