Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CEGLAttributes< AttributeCount > Class Template Reference

#include <EGLUtils.h>

Classes

struct  EGLAttribute
 

Public Member Functions

 CEGLAttributes ()
 
void Add (std::initializer_list< EGLAttribute > const &attributes)
 
void Add (EGLAttribute const &attribute)
 
EGLint const * Get () const
 
int Size () const
 

Detailed Description

template<std::size_t AttributeCount>
class CEGLAttributes< AttributeCount >

Convenience wrapper for stack-allocated EGL attribute arrays

The wrapper makes sure that the key/value pairs are always written in actual pairs, that the array is always terminated with EGL_NONE, and that the bounds of the array are not exceeded (checked on runtime).

Template Parameters
AttributeCountmaximum number of attributes that can be added. Determines the size of the storage array.

Constructor & Destructor Documentation

◆ CEGLAttributes()

template<std::size_t AttributeCount>
CEGLAttributes< AttributeCount >::CEGLAttributes ( )
inline

Member Function Documentation

◆ Add() [1/2]

template<std::size_t AttributeCount>
void CEGLAttributes< AttributeCount >::Add ( EGLAttribute const & attribute)
inline

Add one attribute

The array is automatically terminated with EGL_NONE

Exceptions
std::out_of_rangeif more than AttributeCount attributes are added in total

◆ Add() [2/2]

template<std::size_t AttributeCount>
void CEGLAttributes< AttributeCount >::Add ( std::initializer_list< EGLAttribute > const & attributes)
inline

Add multiple attributes

The array is automatically terminated with EGL_NONE

Exceptions
std::out_of_rangeif more than AttributeCount attributes are added in total

◆ Get()

template<std::size_t AttributeCount>
EGLint const * CEGLAttributes< AttributeCount >::Get ( ) const
inline

◆ Size()

template<std::size_t AttributeCount>
int CEGLAttributes< AttributeCount >::Size ( ) const
inline

The documentation for this class was generated from the following file: