Louvre
v2.12.0-1
C++ library for Wayland compositors
|
OpenGL utility functions. More...
Static Public Member Functions | |
static char * | openShader (const std::filesystem::path &file) |
Open a GLSL shader file. More... | |
static const char * | glErrorString (GLenum error) |
Gets a string representation of an OpenGL error code. More... | |
static GLuint | maxTextureUnits () |
Maximum number of texture units. More... | |
static GLuint | compileShader (GLenum type, const char *shaderString) |
Compile a shader. More... | |
static LTexture * | loadTexture (const std::filesystem::path &file) |
Create a texture from an image file. More... | |
static bool | hasExtension (const char *extensions, const char *extension) |
Check if a specific OpenGL extension is available. More... | |
OpenGL utility functions.
Set of OpenGL ES 2.0 utility functions.
|
static |
Open a GLSL shader file.
file | Path to the shader file. |
nullptr
in case of error.
|
static |
Gets a string representation of an OpenGL error code.
This function converts an OpenGL error code obtained from glGetError() into a human-readable string.
error | The OpenGL error code returned by glGetError(). |
|
static |
Maximum number of texture units.
|
static |
Compile a shader.
type | Type of shader (GL_VERTEX_SHADER or GL_FRAGMENT_SHADER). |
shaderString | String with the shader source code. |
|
static |
Create a texture from an image file.
Loads and creates a texture from an image file.
DRM_FORMAT_ARGB8888
or DRM_FORMAT_ABGR8888
.file | Path to the image file. Must be an image format supported by STB Image (JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC). |
nullptr
in case of error.
|
static |
Check if a specific OpenGL extension is available.
This function queries the list of supported OpenGL extensions and determines whether the specified extension is among them.
extension | The name of the OpenGL extension to check. |
true
if the extension is available, false
otherwise.