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

Method CopyToBackbuffer

source/common/rendering/gl/gl_postprocess.cpp:144–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142//-----------------------------------------------------------------------------
143
144void FGLRenderer::CopyToBackbuffer(const IntRect *bounds, bool applyGamma)
145{
146 screen->Draw2D(); // draw all pending 2D stuff before copying the buffer
147 twod->Clear();
148
149 GLPPRenderState renderstate(mBuffers);
150 hw_postprocess.customShaders.Run(&renderstate, "screen");
151
152 FGLDebug::PushGroup("CopyToBackbuffer");
153 FGLPostProcessState savedState;
154 savedState.SaveTextureBindings(2);
155 mBuffers->BindOutputFB();
156
157 IntRect box;
158 if (bounds)
159 {
160 box = *bounds;
161 }
162 else
163 {
164 ClearBorders();
165 box = screen->mOutputLetterbox;
166 }
167
168 mBuffers->BindCurrentTexture(0);
169 DrawPresentTexture(box, applyGamma);
170 FGLDebug::PopGroup();
171}
172
173void FGLRenderer::DrawPresentTexture(const IntRect &box, bool applyGamma)
174{

Callers 1

CopyScreenToBufferMethod · 0.45

Calls 6

Draw2DMethod · 0.45
ClearMethod · 0.45
RunMethod · 0.45
SaveTextureBindingsMethod · 0.45
BindOutputFBMethod · 0.45
BindCurrentTextureMethod · 0.45

Tested by

no test coverage detected