Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
material.h
Go to the documentation of this file.
1
6#ifndef MATERIAL_H
7#define MATERIAL_H
8
9#include "gl_common.h"
10#include <cglm/cglm.h>
11
13#define MAX_MATERIAL_NAME_LENGTH 64
14
21typedef struct {
23 vec3 albedo;
24 float
26 float roughness;
27} __attribute__((aligned(SIMD_ALIGNMENT))) PBRMaterial;
28
34typedef struct {
36 int count;
38
44MaterialLib* material_load_presets(const char* path);
45
51
52#endif /* MATERIAL_H */
Common OpenGL definitions, RAII helpers, and utilities.
@ SIMD_ALIGNMENT
Definition gl_common.h:150
#define MAX_MATERIAL_NAME_LENGTH
Maximum length for a material identifier string.
Definition material.h:13
void material_free_lib(MaterialLib *lib)
Frees all memory associated with a material library.
Definition material.c:185
MaterialLib * material_load_presets(const char *path)
Loads a set of material presets from a configuration file.
Definition material.c:142
A collection of material presets loaded from disk or defined at runtime.
Definition material.h:34
PBRMaterial * materials
Definition material.h:35
int count
Definition material.h:36
Surface properties for the physically-based rendering pipeline.
Definition material.h:21
vec3 albedo
Definition material.h:23
float metallic
Definition material.h:25
float roughness
Definition material.h:26