简体   繁体   English

是否可以将纹理作为渲染目标附加到默认帧缓冲区?

[英]Is it possible to attach textures as render target to the default framebuffer?

Is it possible to attach textures as render target to the default framebuffer? 是否可以将纹理作为渲染目标附加到默认帧缓冲区?

Ie

    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

Also why does rendering to texture happen without anit-aliasing? 另外,为什么渲染纹理没有anit-aliasing? Was pretty happy with my cheap 5xRCSAA or what it was. 对我的廉价5xRCSAA或它是什么感到非常高兴。

Is it possible to attach textures as render target to the default framebuffer? 是否可以将纹理作为渲染目标附加到默认帧缓冲区?

No. 没有。

Also why does rendering to texture happen without anit-aliasing? 另外,为什么渲染纹理没有anit-aliasing?

Because antialiasing requires a multisample render target. 因为抗锯齿需要多重采样渲染目标。 Regular textures are not multisampled. 常规纹理不是多重采样的。 But there are multisample textures which for that purpose. 但是有多重样本纹理可用于此目的。 You can create a multisample texture object using glTexStorage2DMultisample or glTexImage2DMultisample . 您可以使用glTexStorage2DMultisampleglTexImage2DMultisample创建多重采样纹理对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM