aboutsummaryrefslogtreecommitdiff
path: root/include/gfx/util/skyquad.h
blob: 2b3fe17a6260b867c9e227b3e930cbc767ef5516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// A skyquad is like a skybox but with a single quad.
#pragma once

typedef struct GfxCore     GfxCore;
typedef struct Scene       Scene;
typedef struct SceneNode   SceneNode;
typedef struct SceneObject SceneObject;
typedef struct Texture     Texture;

/// Create a skyquad.
SceneObject* gfx_make_skyquad(GfxCore*, const Texture*);

/// Set up a skyquad in the scene.
///
/// This function adds two scene nodes under the given root node:
///   - An object node to render the skyquad in the background.
///   - A light node to light up other objects with the skyquad.
///
/// Return the light node under which objects affected by the light can be
/// rooted.
SceneNode* gfx_setup_skyquad(
    GfxCore*, SceneNode* root, const Texture* environment_map);