System hangs at glReadPixel call with GL_TEXTURE_2D_ARRAY for texturing
        Posted  
        
            by 
                Roshan
            
        on Game Development
        
        See other posts from Game Development
        
            or by Roshan
        
        
        
        Published on 2012-12-18T09:45:03Z
        Indexed on 
            2012/12/18
            11:13 UTC
        
        
        Read the original article
        Hit count: 295
        
I am calling glReadPixel after glDrawArray call. I am rendering a geometry with 3D texture on it as a target GL_TEXTURE_2D_ARRAY. My systems hangs at glreadpixel call. When i use target as GL_TEXTURE_3D the issue does not occurs and it correctly reads the framebuffer contents.
glReadPixels(0, 0, GetViewportWidth(), GetViewportHeight(), GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid *)rendered_pixels);
I am using SNORM textures with GL_byte data in glTeximage3D call and I am not calling glPixelStorei, is it because of this? What should be the parameter for pixelstore call?
© Game Development or respective owner