![](/img/trans.png)
[英]is it possible to copy the default framebuffer to another framebuffer object in OpenGL?
[英]Is it possible to attach textures as render target to the default framebuffer?
是否可以将纹理作为渲染目标附加到默认帧缓冲区?
即
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
GLenum bufs[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1};
glDrawBuffers(2, bufs);
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sceneTexture, 0);
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, postProcessingStuffTexture, 0);
// Draw something
另外,为什么渲染纹理没有anit-aliasing? 对我的廉价5xRCSAA或它是什么感到非常高兴。
是否可以将纹理作为渲染目标附加到默认帧缓冲区?
没有。
另外,为什么渲染纹理没有anit-aliasing?
因为抗锯齿需要多重采样渲染目标。 常规纹理不是多重采样的。 但是有多重样本纹理可用于此目的。 您可以使用glTexStorage2DMultisample或glTexImage2DMultisample创建多重采样纹理对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.