FS2_Open
Open source remastering of the Freespace 2 engine
gropengllight.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 
13 #ifndef _GROPENGLLIGHT_H
14 #define _GROPENGLLIGHT_H
15 
16 #include "graphics/gropengl.h"
17 
18 
20  float r,g,b,a;
21 };
22 
23 // Structures
25 {
27 
28  // light position
30 
31  // spotlight direction (for tube lights)
33 
36 
37  bool occupied;
38  int type;
39 };
40 
41 struct light_data;
42 
43 //Variables
44 extern bool lighting_is_enabled;
45 extern GLint GL_max_lights;
46 extern int Num_active_gl_lights;
47 extern int GL_center_alpha;
48 extern float GL_light_factor;
49 
50 //Functions
51 int gr_opengl_make_light(light *fs_light, int idx, int priority); //unused -- stub function
52 void gr_opengl_modify_light(light *fs_light, int idx, int priority); //unused -- stub function
53 void gr_opengl_destroy_light(int idx); //unused -- stub function
54 void gr_opengl_set_light(light *fs_light);
56 void gr_opengl_set_lighting(bool set, bool state);
59 void gr_opengl_set_ambient_light(int red, int green, int blue);
61 
62 void opengl_change_active_lights(int pos, int d_offset = 0);
63 void opengl_light_init();
65 void opengl_default_light_settings(int amb = 1, int emi = 1, int spec = 1);
66 
67 #endif //_GROPENGLLIGHT_H
float GL_light_factor
float LinearAtten
Definition: gropengllight.h:35
float factor
Definition: lua.cpp:440
void gr_opengl_center_alpha(int type)
void opengl_light_init()
GLenum type
Definition: Gl.h:1492
int GL_center_alpha
void gr_opengl_reset_lighting()
GLclampf GLclampf blue
Definition: Glext.h:5177
void gr_opengl_set_light(light *fs_light)
void gr_opengl_destroy_light(int idx)
void opengl_default_light_settings(int amb=1, int emi=1, int spec=1)
void opengl_change_active_lights(int pos, int d_offset=0)
void gr_opengl_set_ambient_light(int red, int green, int blue)
int idx
Definition: multiui.cpp:761
GLclampf green
Definition: Glext.h:5177
bool lighting_is_enabled
void gr_opengl_set_lighting(bool set, bool state)
GLint GL_max_lights
Definition: lighting.h:32
float ConstantAtten
Definition: gropengllight.h:35
void gr_opengl_modify_light(light *fs_light, int idx, int priority)
void opengl_light_shutdown()
int Num_active_gl_lights
void gr_opengl_set_light_factor(float factor)
float SpotCutOff
Definition: gropengllight.h:34
hull_check pos
Definition: lua.cpp:5050
GLfloat Diffuse[4]
Definition: gropengllight.h:26
GLfloat SpotDir[3]
Definition: gropengllight.h:32
GLfloat Ambient[4]
Definition: gropengllight.h:26
int gr_opengl_make_light(light *fs_light, int idx, int priority)
GLfloat Position[4]
Definition: gropengllight.h:29
void gr_opengl_set_center_alpha(int type)
float QuadraticAtten
Definition: gropengllight.h:35
GLfloat Specular[4]
Definition: gropengllight.h:26
int GLint
Definition: Gl.h:48
float GLfloat
Definition: Gl.h:53