Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Qt3D use default depth buffer in a QRenderTarget
Forum Updated to NodeBB v4.3 + New Features

Qt3D use default depth buffer in a QRenderTarget

Scheduled Pinned Locked Moved Unsolved Game Development
1 Posts 1 Posters 472 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    unclejimbo 0
    wrote on last edited by unclejimbo 0
    #1

    Hi all,
    Can I reuse the default depth-stencil buffer in a new QRenderTarget? There seems no way to tell a QRenderTargetOutput to use the default draw buffer rather than a QTexture.
    And I've also tried to use QBlitFramebuffer to blit a depth texture from the default back buffer w/o success. I used RenderDoc to trace the frame and it tells that the COLOR_0 attachment is blitted rather than the DEPTH_STENCIL attachment which I've specified. Here's my code,

        auto blit = new Qt3DRender::QBlitFramebuffer(parent);
        blit->setSource(nullptr);
        blit->setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::DepthStencil);
        blit->setSourceRect(QRectF(0, 0, m_size.width(), m_size.height()));
        blit->setDestination(m_renderTarget);
        blit->setDestinationAttachmentPoint(Qt3DRender::QRenderTargetOutput::DepthStencil);
        blit->setDestinationRect(QRectF(0, 0, m_size.width(), m_size.height()));
        new Qt3DRender::QNoDraw(blit);
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved