Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | List of all members
RGLFormat Struct Reference

OpenGL ES pixel format descriptor mapped from a DRM format. More...

#include <RGLFormat.h>

Static Public Member Functions

static const RGLFormatFromDRM (RFormat format) noexcept
 Returns the GL format descriptor for a given DRM fourcc format.
 

Public Attributes

GLint format
 Client pixel format (e.g. GL_RGBA, GL_BGRA_EXT, GL_ALPHA).
 
GLint internalFormat
 Sized internal format (e.g. GL_RGBA8_OES, GL_BGRA8_EXT).
 
GLint type
 Component data type (e.g. GL_UNSIGNED_BYTE, GL_HALF_FLOAT_OES).
 

Detailed Description

OpenGL ES pixel format descriptor mapped from a DRM format.

Bundles the three arguments GLES needs to describe a pixel layout in calls such as glTexImage2D()/glReadPixels(): the client-side format, the sized internal format, and the component type.

Member Function Documentation

◆ FromDRM()

static const RGLFormat * FromDRM ( RFormat  format)
staticnoexcept

Returns the GL format descriptor for a given DRM fourcc format.

Parameters
formatA DRM fourcc format code.
Returns
A pointer to a static RGLFormat describing the GL layout, or nullptr if the DRM format has no known GL mapping. Some mappings are only available on little-endian hosts.

Member Data Documentation

◆ format

GLint format

Client pixel format (e.g. GL_RGBA, GL_BGRA_EXT, GL_ALPHA).

◆ internalFormat

GLint internalFormat

Sized internal format (e.g. GL_RGBA8_OES, GL_BGRA8_EXT).

◆ type

GLint type

Component data type (e.g. GL_UNSIGNED_BYTE, GL_HALF_FLOAT_OES).