Handles rendering and generating the nebula.
More...
#include "nebula.h"
#include "camera.h"
#include "conf.h"
#include "gui.h"
#include "menu.h"
#include "ntracing.h"
#include "opengl.h"
#include "player.h"
#include "rng.h"
#include "vec2.h"
Go to the source code of this file.
Handles rendering and generating the nebula.
Definition in file nebula.c.
◆ NEBULA_PUFF_BUFFER
| #define NEBULA_PUFF_BUFFER 300 |
Nebula buffer
Definition at line 22 of file nebula.c.
◆ nebu_blitFBO()
| void nebu_blitFBO |
( |
void | | ) |
|
|
static |
If we're drawing the nebula buffered, copy to the screen.
Definition at line 196 of file nebula.c.
◆ nebu_exit()
Cleans up the nebu subsystem.
Definition at line 132 of file nebula.c.
◆ nebu_getSightRadius()
| double nebu_getSightRadius |
( |
void | | ) |
|
Gets the nebula view radius.
- Returns
- The nebula view radius.
Definition at line 124 of file nebula.c.
◆ nebu_init()
Initializes the nebula.
- Returns
- 0 on success.
Definition at line 73 of file nebula.c.
◆ nebu_prep()
| void nebu_prep |
( |
double | density, |
|
|
double | volatility, |
|
|
double | hue ) |
Prepares the nebualae to be rendered.
- Parameters
-
| density | Density of the nebula (0-1000). |
| volatility | Volatility of the nebula. |
| hue | Hue of the nebula (0-1). |
Definition at line 397 of file nebula.c.
◆ nebu_render()
| void nebu_render |
( |
const double | dt | ) |
|
Renders the nebula.
- Parameters
-
Definition at line 145 of file nebula.c.
◆ nebu_renderBackground()
| void nebu_renderBackground |
( |
const double | dt | ) |
|
|
static |
Renders the nebula using the multitexture approach.
- Parameters
-
Definition at line 160 of file nebula.c.
◆ nebu_renderOverlay()
| void nebu_renderOverlay |
( |
const double | dt | ) |
|
Renders the nebula overlay (hides what player can't see).
- Parameters
-
Definition at line 257 of file nebula.c.
◆ nebu_renderPuffs()
| void nebu_renderPuffs |
( |
int | below_player | ) |
|
|
static |
Renders the puffs.
- Parameters
-
| below_player | Render the puffs below player or above player? |
Definition at line 314 of file nebula.c.
◆ nebu_resize()
Handles a screen s.
- Returns
- 0 on success.
Definition at line 84 of file nebula.c.
◆ nebu_update()
| void nebu_update |
( |
double | dt | ) |
|
Updates visibility and stuff.
Definition at line 210 of file nebula.c.
◆ nebu_updateColour()
| void nebu_updateColour |
( |
void | | ) |
|
◆ nebu_density
The density.
Definition at line 26 of file nebula.c.
◆ nebu_dofbo
◆ nebu_dt
How fast nebula changes.
Definition at line 30 of file nebula.c.
◆ nebu_dx
Initial value:Length scale (space coords) for turbulence/eddies we draw.
Definition at line 27 of file nebula.c.
◆ nebu_fbo
| GLuint nebu_fbo = GL_INVALID_VALUE |
|
static |
◆ nebu_hue
◆ nebu_npuffs
Number of puffs.
Definition at line 55 of file nebula.c.
◆ nebu_puffs
Stack of puffs.
Definition at line 54 of file nebula.c.
◆ nebu_render_h
| GLfloat nebu_render_h = 0. |
|
static |
◆ nebu_render_P
◆ nebu_render_w
| GLfloat nebu_render_w = 0. |
|
static |
◆ nebu_scale
How much to scale nebula.
Definition at line 34 of file nebula.c.
◆ nebu_tex
| GLuint nebu_tex = GL_INVALID_VALUE |
|
static |
◆ nebu_time
Elapsed time since entering system.
Definition at line 31 of file nebula.c.
◆ nebu_view
How far player can see.
Definition at line 29 of file nebula.c.
◆ puff_x
◆ puff_y