Open source remastering of the Freespace 2 engine
gropengllight.cpp File Reference
#include <algorithm>
#include "cmdline/cmdline.h"
#include "globalincs/pstypes.h"
#include <globalincs/systemvars.h>
#include "graphics/2d.h"
#include "graphics/gropenglextension.h"
#include "graphics/gropengllight.h"
#include "graphics/gropenglstate.h"
#include "lighting/lighting.h"
#include "render/3d.h"

Go to the source code of this file.


void FSLight2GLLight (light *FSLight, opengl_light *GLLight)
void opengl_set_light (int light_num, opengl_light *ltp)
bool opengl_sort_active_lights (const opengl_light &la, const opengl_light &lb)
void opengl_pre_render_init_lights ()
void opengl_change_active_lights (int pos, int d_offset)
int gr_opengl_make_light (light *fs_light, int idx, int priority)
void gr_opengl_modify_light (light *fs_light, int idx, int priority)
void gr_opengl_destroy_light (int idx)
void gr_opengl_set_light (light *fs_light)
void gr_opengl_center_alpha (int type)
void gr_opengl_set_center_alpha (int type)
void gr_opengl_set_light_factor (float factor)
void gr_opengl_reset_lighting ()
void opengl_calculate_ambient_factor ()
void opengl_light_shutdown ()
void opengl_light_init ()
void opengl_default_light_settings (int ambient, int emission, int specular)
void gr_opengl_set_lighting (bool set, bool state)
void gr_opengl_set_ambient_light (int red, int green, int blue)


opengl_lightopengl_lights = NULL
bool lighting_is_enabled = true
int Num_active_gl_lights = 0
int GL_center_alpha = 0
float GL_light_factor = 1.0f
float static_point_factor
float static_light_factor
float static_tube_factor
double specular_exponent_value
float Cmdline_ogl_spec
GLint GL_max_lights = 0
int Cmdline_no_emissive
bool ambient_state = false
bool emission_state = false
bool specular_state = false

Function Documentation

void FSLight2GLLight ( light FSLight,
opengl_light GLLight 

Definition at line 55 of file gropengllight.cpp.

void gr_opengl_center_alpha ( int  type)

Definition at line 379 of file gropengllight.cpp.

void gr_opengl_destroy_light ( int  idx)

Definition at line 351 of file gropengllight.cpp.

int gr_opengl_make_light ( light fs_light,
int  idx,
int  priority 

Definition at line 342 of file gropengllight.cpp.

void gr_opengl_modify_light ( light fs_light,
int  idx,
int  priority 

Definition at line 347 of file gropengllight.cpp.

void gr_opengl_reset_lighting ( )

Definition at line 459 of file gropengllight.cpp.

void gr_opengl_set_ambient_light ( int  red,
int  green,
int  blue 

Definition at line 608 of file gropengllight.cpp.

void gr_opengl_set_center_alpha ( int  type)

Definition at line 384 of file gropengllight.cpp.

void gr_opengl_set_light ( light fs_light)

Definition at line 355 of file gropengllight.cpp.

void gr_opengl_set_light_factor ( float  factor)

Definition at line 454 of file gropengllight.cpp.

void gr_opengl_set_lighting ( bool  set,
bool  state 

Definition at line 584 of file gropengllight.cpp.

void opengl_calculate_ambient_factor ( )

Definition at line 477 of file gropengllight.cpp.

void opengl_change_active_lights ( int  pos,
int  d_offset 

Definition at line 235 of file gropengllight.cpp.

void opengl_default_light_settings ( int  ambient,
int  emission,
int  specular 

Definition at line 536 of file gropengllight.cpp.

void opengl_light_init ( )

Definition at line 507 of file gropengllight.cpp.

void opengl_light_shutdown ( )

Definition at line 499 of file gropengllight.cpp.

void opengl_pre_render_init_lights ( )

Definition at line 221 of file gropengllight.cpp.

void opengl_set_light ( int  light_num,
opengl_light ltp 

Definition at line 160 of file gropengllight.cpp.

bool opengl_sort_active_lights ( const opengl_light la,
const opengl_light lb 

Definition at line 186 of file gropengllight.cpp.

Variable Documentation

bool ambient_state = false

Definition at line 533 of file gropengllight.cpp.

int Cmdline_no_emissive

Definition at line 330 of file cmdline.cpp.

float Cmdline_ogl_spec

Definition at line 321 of file cmdline.cpp.

bool emission_state = false

Definition at line 534 of file gropengllight.cpp.

int GL_center_alpha = 0

Definition at line 35 of file gropengllight.cpp.

float GL_light_factor = 1.0f

Definition at line 36 of file gropengllight.cpp.

GLint GL_max_lights = 0

Definition at line 45 of file gropengllight.cpp.

bool lighting_is_enabled = true

Definition at line 33 of file gropengllight.cpp.

int Num_active_gl_lights = 0

Definition at line 34 of file gropengllight.cpp.

opengl_light* opengl_lights = NULL

Definition at line 32 of file gropengllight.cpp.

double specular_exponent_value

Definition at line 747 of file lighting.cpp.

bool specular_state = false

Definition at line 535 of file gropengllight.cpp.

float static_light_factor

Definition at line 744 of file lighting.cpp.

float static_point_factor

Definition at line 746 of file lighting.cpp.

float static_tube_factor

Definition at line 745 of file lighting.cpp.