LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
lg_cubemap.c File Reference

Functions

LG_CubeMaplg_cubemap_new (const char **textures)
 
void lg_cubemap_free (LG_CubeMap *cubemap)
 
const Vertexlg_skybox ()
 
size_t lg_sizeof_skybox ()
 

Detailed Description

 === Wrapper funcs to more easily create and manage cubemaps and skyboxes ===

Function Documentation

◆ lg_cubemap_new()

LG_CubeMap* lg_cubemap_new ( const char **  textures)

Create a new cubemap

A LG_CubeMap is just a LG_Texture

Parameters
texturesAn array of 6 image paths in {right, left, top, bottom, front, back} order
Returns
A new cubemap

◆ lg_cubemap_free()

void lg_cubemap_free ( LG_CubeMap cubemap)

Remove cubemap from texture list AND free associated resources

Parameters
cubemapA pointer to a LG_CubeMap

◆ lg_skybox()

const Vertex* lg_skybox ( )

Return a skybox

Returns
A static skybox as an array of Vertex

◆ lg_sizeof_skybox()

size_t lg_sizeof_skybox ( )

Get size of a skybox

Returns
The size of a static skybox