I’m trying to read a single pixel from the (format=RedInteger, type=Byte, intformat=R8ui) texture. ReadPixels returns without GL errors but doesn’t change the value I pass, somehow.
GL.BindFramebuffer(FramebufferTarget.Framebuffer, fbo_id) GL.ClearBuffer(ClearBuffer.Color, 0, (of uint:10,10,10,10)) //some drawing code GL.ReadBuffer( ReadBufferMode.ColorAttachment0 ) GL.BindBuffer( BufferTarget.PixelPackBuffer, 0 ) val = (of byte: 20,) GL.ReadPixels(coord,coord,1,1, PixelFormat.RedInteger, PixelType.Byte, val)
The val remains 20 after the ReadPixels call, what clearly shows that it hasn’t been touched at all.
The coord[0:2] values are in range of the buffer.
Environment: winxp, Catalyst 9.10, opentk, GL 3.1 pure context.
Does anyone has an idea about that?
Thanks in advance,