Handles rendering and generating the nebula.
More...
#include "nebula.h"
#include "camera.h"
#include "conf.h"
#include "gui.h"
#include "log.h"
#include "menu.h"
#include "opengl.h"
#include "player.h"
#include "rng.h"
#include "spfx.h"
#include "vec2.h"
Go to the source code of this file.
|
| static void | nebu_renderPuffs (int below_player) |
| | Renders the puffs.
|
| |
| static void | nebu_renderBackground (const double dt) |
| | Renders the nebula using the multitexture approach.
|
| |
| static void | nebu_blitFBO (void) |
| | If we're drawing the nebula buffered, copy to the screen.
|
| |
| int | nebu_init (void) |
| | Initializes the nebula.
|
| |
| int | nebu_resize (void) |
| | Handles a screen s.
|
| |
| double | nebu_getSightRadius (void) |
| | Gets the nebula view radius.
|
| |
| void | nebu_exit (void) |
| | Cleans up the nebu subsystem.
|
| |
| void | nebu_render (const double dt) |
| | Renders the nebula.
|
| |
| void | nebu_update (double dt) |
| | Updates visibility and stuff.
|
| |
| void | nebu_renderOverlay (const double dt) |
| | Renders the nebula overlay (hides what player can't see).
|
| |
| void | nebu_prep (double density, double volatility, double hue) |
| | Prepares the nebualae to be rendered.
|
| |
Handles rendering and generating the nebula.
Definition in file nebula.c.
◆ NEBULA_PUFF_BUFFER
| #define NEBULA_PUFF_BUFFER 300 |
Nebula buffer
Definition at line 26 of file nebula.c.
◆ nebu_blitFBO()
| static void nebu_blitFBO |
( |
void | | ) |
|
|
static |
If we're drawing the nebula buffered, copy to the screen.
Definition at line 191 of file nebula.c.
◆ nebu_exit()
Cleans up the nebu subsystem.
Definition at line 134 of file nebula.c.
◆ nebu_getSightRadius()
| double nebu_getSightRadius |
( |
void | | ) |
|
Gets the nebula view radius.
- Returns
- The nebula view radius.
Definition at line 126 of file nebula.c.
◆ nebu_init()
Initializes the nebula.
- Returns
- 0 on success.
Definition at line 76 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 379 of file nebula.c.
◆ nebu_render()
| void nebu_render |
( |
const double | dt | ) |
|
Renders the nebula.
- Parameters
-
Definition at line 147 of file nebula.c.
◆ nebu_renderBackground()
| static void nebu_renderBackground |
( |
const double | dt | ) |
|
|
static |
Renders the nebula using the multitexture approach.
- Parameters
-
Definition at line 158 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 271 of file nebula.c.
◆ nebu_renderPuffs()
| static void nebu_renderPuffs |
( |
int | below_player | ) |
|
|
static |
Renders the puffs.
- Parameters
-
| below_player | Render the puffs below player or above player? |
Definition at line 325 of file nebula.c.
◆ nebu_resize()
Handles a screen s.
- Returns
- 0 on success.
Definition at line 87 of file nebula.c.
◆ nebu_update()
| void nebu_update |
( |
double | dt | ) |
|
Updates visibility and stuff.
Definition at line 224 of file nebula.c.
◆ nebu_density
The density.
Definition at line 30 of file nebula.c.
◆ nebu_dofbo
◆ nebu_dt
How fast nebula changes.
Definition at line 33 of file nebula.c.
◆ nebu_dx
Length scale (space coords) for turbulence/eddies we draw.
Definition at line 31 of file nebula.c.
◆ nebu_fbo
| GLuint nebu_fbo = GL_INVALID_VALUE |
|
static |
◆ nebu_hue
◆ nebu_npuffs
Number of puffs.
Definition at line 58 of file nebula.c.
◆ nebu_puffs
Stack of puffs.
Definition at line 57 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 37 of file nebula.c.
◆ nebu_tex
| GLuint nebu_tex = GL_INVALID_VALUE |
|
static |
◆ nebu_time
Elapsed time since entering system.
Definition at line 34 of file nebula.c.
◆ nebu_view
How far player can see.
Definition at line 32 of file nebula.c.
◆ puff_x
◆ puff_y