MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Disable

Method Disable

GTE/Graphics/GL46/GL46DrawTarget.cpp:113–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void GL46DrawTarget::Disable()
114{
115 // Restore to default frame buffer rendering.
116 glBindFramebuffer(GL_FRAMEBUFFER, 0);
117
118 // Restore viewport.
119 glViewport(mSaveViewportX, mSaveViewportY, mSaveViewportWidth, mSaveViewportHeight);
120 glDepthRange(mSaveViewportNear, mSaveViewportFar);
121
122 // When done, test each render target texture if it needs to have its
123 // mipmaps automatically generated.
124 auto const numTargets = mTarget->GetNumTargets();
125 for (uint32_t i = 0; i < numTargets; ++i)
126 {
127 auto textureRT = mRTTextures[i];
128 if (textureRT->CanAutoGenerateMipmaps())
129 {
130 textureRT->GenerateMipmaps();
131 }
132 }
133}
134
135

Callers

nothing calls this directly

Calls 6

glBindFramebufferFunction · 0.85
glViewportFunction · 0.85
glDepthRangeFunction · 0.85
GetNumTargetsMethod · 0.45
GenerateMipmapsMethod · 0.45

Tested by

no test coverage detected