Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Another problem of multisample, about blit of GL_DEPTH24_STENCIL8_EXT.

  1. #1
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74

    Another problem of multisample, about blit of GL_DEPTH24_STENCIL8_EXT.

    Hi, All

    Things go that I'm using multisample with GL_DEPTH24_STENCIL8_EXT and blitting between framebuffers. The source framebuffer's code runs:

    Code :
    ...
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,samples,GL_DEPTH24_STENCIL8_EXT,width,height);
    glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    ...

    Another framebuffer that is the target framebuffer goes the same way. But when I try to blit between them as following

    Code :
    glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,srcframebuffer);
    glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT,targetframebuffer);
     
    glBlitFramebufferEXT(0,0,width,height,0,0,width,height,GL_DEPTH_BUFFER_BIT,GL_NEAREST);       // *

    the line * cause a memory access fault.

    So how to modify the code to fulfill the task of this blit? Anyone can help me?

    Dark Photon, can you help me?


    Best Regards,

    newbiecow
    Last edited by newbiecow; 12-11-2012 at 08:11 PM.

  2. #2
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74
    Quote Originally Posted by newbiecow View Post
    Hi, All

    Things go that I'm using multisample with GL_DEPTH24_STENCIL8_EXT and blitting between framebuffers. The source framebuffer's code runs:

    Code :
    ...
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,samples,GL_DEPTH24_STENCIL8_EXT,width,height);
    glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
    ...

    Another framebuffer that is the target framebuffer goes the same way. But when I try to blit between them as following

    Code :
    glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,srcframebuffer);
    glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT,targetframebuffer);
     
    glBlitFramebufferEXT(0,0,width,height,0,0,width,height,GL_DEPTH_BUFFER_BIT,GL_NEAREST);       // *

    the line * cause a memory access fault.

    So how to modify the code to fulfill the task of this blit? Anyone can help me?

    Dark Photon, can you help me?


    Best Regards,

    newbiecow

    Anyone can give any advice?

    Thanks in advance!

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    What GPU do you have, what is your GL target version? Is GL_EXT_framebuffer_blit or GL_ARB_framebuffer_object supported by your current GPU and driver?

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126
    Need some more code. A small stand-alone test program that illustrates your problem would be good.

  5. #5
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74
    Quote Originally Posted by Dark Photon View Post
    Need some more code. A small stand-alone test program that illustrates your problem would be good.
    Thanks for your help, Dark Photon.
    It seems an implemention-dependent problem. I decided to try other ways to evade this one.
    Thank you all the same.


    Best Regards,

    newbiecow

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •