|
libcamera v0.7.0+1-4ceceb68
Supporting cameras in Linux since 2019
|
Helper class for managing EGL image resources. More...
#include <egl.h>
Public Member Functions | |
| eGLImage (uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id) | |
| Construct an eGLImage with explicit stride. | |
| ~eGLImage () | |
| Destroy the eGLImage. | |
Public Attributes | |
| uint32_t | width_ |
| uint32_t | height_ |
| uint32_t | stride_ |
| uint32_t | offset_ |
| uint32_t | framesize_ |
| uint32_t | texture_unit_uniform_id_ |
| GLenum | texture_unit_ |
| GLuint | texture_ |
| GLuint | fbo_ |
| EGLImageKHR | image_ |
Helper class for managing EGL image resources.
The eGLImage class encapsulates OpenGL ES texture and framebuffer objects along with their associated EGL image. It aggregates handles, descriptors, and routines for managing textures that can be associated with shader uniform IDs.
This class is particularly useful for managing DMA-BUF backed textures in zero-copy rendering pipelines, where textures are bound to specific texture units and can be used as both input textures and render targets.
|
inline |
Construct an eGLImage with explicit stride.
| [in] | width | Image width in pixels |
| [in] | height | Image height in pixels |
| [in] | stride | Row stride in bytes |
| [in] | texture_unit | OpenGL texture unit |
| [in] | texture_unit_uniform_id | Shader uniform ID |
|
inline |
Destroy the eGLImage.
Cleans up OpenGL resources by deleting the framebuffer object and texture.
| GLuint libcamera::eGLImage::fbo_ |
OpenGL frame buffer object ID
| uint32_t libcamera::eGLImage::framesize_ |
Total frame size in bytes (stride * height)
| uint32_t libcamera::eGLImage::height_ |
Image height in pixels
| EGLImageKHR libcamera::eGLImage::image_ |
EGL Image handle
| uint32_t libcamera::eGLImage::offset_ |
Buffer offset (reserved for future use)
| uint32_t libcamera::eGLImage::stride_ |
Row stride in bytes
| GLuint libcamera::eGLImage::texture_ |
OpenGL texture object ID
| GLenum libcamera::eGLImage::texture_unit_ |
Texture unit associated with this image eg (GL_TEXTURE0)
| uint32_t libcamera::eGLImage::texture_unit_uniform_id_ |
Shader uniform id for texture unit
| uint32_t libcamera::eGLImage::width_ |
Image width in pixels