OpenGL-Registry icon indicating copy to clipboard operation
OpenGL-Registry copied to clipboard

TEXTURE_EXTERNAL_OES target with RGB color format as the render target

Open shutaozhenzhen opened this issue 1 year ago • 4 comments

In EXT_YUV_target, it says:

To perform the YUV rendering capability in this extension an application will attach a texture to the framebuffer object as the color attachment. If the texture has a target type of TEXTURE_EXTERNAL_OES with YUV color format then the GL driver can use this framebuffer object as the render target, TEXTURE_EXTERNAL_OES target with RGB color format are not allowed with this extension.

So which extension allow TEXTURE_EXTERNAL_OES target with RGB(and RGBA) color format as the render target? I searched the project, can not find infomation.

I'm now work in Mali G52 with EXT_YUV_target and EGL_EXT_image_dma_buf_import.txt, which allow external texture like RA24, and allow bind to framebuffer, write by glClear or shader. But I can not find which extension allow this. Only EXT_YUV_target allow bind TEXTURE_EXTERNAL_OES to framebuffer, but do not allow RGB.

Is it better to provide another extension to ensure this operation?

shutaozhenzhen avatar Jul 17 '24 13:07 shutaozhenzhen

OES_EGL_image_external defines the TEXTURE_EXTERNAL_OES texture target. Any EGLImage can be bound to this target. See the EGL image extensions for which those which let you create an RGB or RGBA EGLImage, e.g. EGL_KHR_gl_image.

MarkCallow avatar Aug 14 '24 05:08 MarkCallow

OES_EGL_image_external defines the TEXTURE_EXTERNAL_OES texture target. Any EGLImage can be bound to this target. See the EGL image extensions for which those which let you create an RGB or RGBA EGLImage, e.g. EGL_KHR_gl_image.

yes, but it seems they are defined as sampler. Framebuffer do not contain in them

shutaozhenzhen avatar Aug 14 '24 07:08 shutaozhenzhen

@stonesthrow Maybe you want to comment here?

zmike avatar Aug 14 '24 15:08 zmike

GL_EXT_YUV_target - talks about rendering (only YUV), but also sampling details.

GL_OES_EGL_image_external - talks about making EGLImage into texture TEXTURE_2D and TEXTURE_EXTERNAL. But only discusses sampling.

TEXTURE_2D already enables RGBA rendering image_external allows for new formats (RGBA and YUV) of EGLImages to texture - sampling. YUV_target is newer and builds on the image_external to allow for a mechanism for YUV rendering.

stonesthrow avatar Aug 14 '24 19:08 stonesthrow