gl::Error SurfaceD3D::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, FramebufferAttachmentRenderTarget **rtOut) { if (target.binding() == GL_BACK) { *rtOut = mSwapChain->getColorRenderTarget(); } else { *rtOut = mSwapChain->getDepthStencilRenderTarget(); } return gl::Error(GL_NO_ERROR); }
GLenum Surface::getAttachmentInternalFormat(const gl::FramebufferAttachment::Target &target) const { const egl::Config *config = getConfig(); return (target.binding() == GL_BACK ? config->renderTargetFormat : config->depthStencilFormat); }