MCPcopy Create free account
hub / github.com/TurningWheel/Barony / bindForWriting

Method bindForWriting

src/draw.cpp:930–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928static std::vector<framebuffer*> fbStack;
929
930void framebuffer::bindForWriting() {
931 if (fbo) {
932 GL_CHECK_ERR(glBindFramebuffer(GL_FRAMEBUFFER, fbo));
933 GL_CHECK_ERR(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fbo_color, 0));
934 GL_CHECK_ERR(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, fbo_depth, 0));
935 GL_CHECK_ERR(glViewport(0, 0, xsize, ysize));
936 fbStack.push_back(this);
937 }
938}
939
940void framebuffer::bindForReading() const {
941 GL_CHECK_ERR(glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo));

Callers 11

unbindForWritingMethod · 0.80
glBeginCameraFunction · 0.80
GO_GetPixelU32Function · 0.80
GO_SwapBuffersFunction · 0.80
mainFunction · 0.80
initAppFunction · 0.80
changeVideoModeFunction · 0.80
resizeWindowFunction · 0.80
baseCreateLoadingScreenFunction · 0.80
predrawMethod · 0.80
postdrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected