PDA

View Full Version : Copy texture from GL_RGBA8I renderbuffer for GL_RGBA16I texture using CopyTexSubImage



harsha
04-23-2014, 11:50 PM
The opengl es3 specification says that

"The error INVALID_OPERATION is generated if signed integer RGBA data is required
and the format of the current color buffer is not signed integer; if unsigned integer
RGBA data is required and the format of the current color buffer is not unsigned
integer; or if floating- or fixed-point RGBA data is required and the format of the
current color buffer is signed or unsigned integer."

So can we create a framebuffer with renderbuffer object as color attachment with format GL_RGBA8I , and copy this as a texture using glCopyTexSubImage2D with format GL_RGBA16I. Is it valid?

Will it not conflict for different size per color component?

When I am trying this for Opengl on Nvidia, it is allowing me to do so.
But want to know for opengl es 3.

debonair
04-24-2014, 12:09 AM
one doubt on above question,
according to me we use render buffer attachment only when we don't have to read data or we use it only when we blit data in framebuffer. so for performing we should use texture attachment instead of render buffer attachment. I am just wondering how does the above code work? So in nutshell, when we use texture attachment and not render buffer attachment or vice-versa?

harsha
04-24-2014, 12:52 AM
Sorry for the confusion, I am using render buffer object as color attachment to framebuffer And the renderbuffer object has format GL_RGBA8I. Binding that frambuffer drawing something to it.
Now has defined another texture with format GL_RGBA16I .Then copying some part of that framebuffer data using CopyTexSubImage2D to modify the GL_RGBA16I texture data.
For CopyTexImage* its working. But want to know is it valid for CopyTexSubImage* ?
I am experimenting with CopyTexSubImage*.