Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <assert.h>
#include <cstring>
#include "gl_globals.h"
#include "hashtable_3d.h"
#include "gl_light.h"
#include <math.h>
#include "gfx/matrix.h"
Go to the source code of this file.
Macros | |
#define | M_PI 3.14159265358979323846264338328 |
#define | GFX_HARDWARE_LIGHTING |
Functions | |
void | GFXUploadLightState (int max_light_location, int active_light_array, int apparent_light_size_array, bool shader, vector< int >::const_iterator begin, vector< int >::const_iterator end) |
int | findLocalClobberable () |
Finds the local lights that are clobberable for new lights (permanent perhaps) More... | |
static int | findGlobalClobberable () |
void | light_rekey_frame () |
Rekeys a frame, remembering trashing old lights activated last frame. More... | |
Variables | |
const float | atten0scale = 1 |
const float | atten1scale = 1./GFX_SCALE |
const float | atten2scale = 1./(GFX_SCALE*GFX_SCALE) |
int | _GLLightsEnabled = 0 |
How many lights are enabled (for fast picking) More... | |
Hashtable3d< LineCollideStar, 20, CTACC, lighthuge > | lighttable |
table to store local lights, numerical pointers to _llights (eg indices) More... | |
#define GFX_HARDWARE_LIGHTING |
Definition at line 139 of file gl_light_state.cpp.
#define M_PI 3.14159265358979323846264338328 |
Definition at line 11 of file gl_light_state.cpp.
Referenced by GFXUploadLightState().
|
static |
Definition at line 173 of file gl_light_state.cpp.
References GFX_MAX_LIGHTS, OpenGLL::GLL_LOCAL, OpenGLL::GLL_ON, GLLights, i, and index.
Referenced by gfx_light::Create(), and gfx_light::Enable().
int findLocalClobberable | ( | ) |
Finds the local lights that are clobberable for new lights (permanent perhaps)
Definition at line 161 of file gl_light_state.cpp.
References GFX_MAX_LIGHTS, OpenGLL::GLL_ON, GLLights, i, and index.
Referenced by gfx_light::Create(), and gfx_light::dopickenables().
void GFXUploadLightState | ( | int | max_light_location, |
int | active_light_array, | ||
int | apparent_light_size_array, | ||
bool | shader, | ||
vector< int >::const_iterator | begin, | ||
vector< int >::const_iterator | end | ||
) |
Definition at line 14 of file gl_light_state.cpp.
References gfx_light::ContextSwitchClobberLight(), gfx_light::enabled(), float, GFXLight::getPosition(), GFXLight::getSize(), GFX_MAX_LIGHTS, GFXGetMatrixModel(), GFXLoadIdentity(), GFXLoadMatrixModel(), GFXShaderConstant4v(), GFXShaderConstanti(), GFXShaderConstantv(), i, M_PI, MODEL, Matrix::p, QVector, and UniverseUtil::sqrt().
void light_rekey_frame | ( | ) |
Rekeys a frame, remembering trashing old lights activated last frame.
Definition at line 498 of file gl_light_state.cpp.
References _llights, GFX_MAX_LIGHTS, OpenGLL::GL_ENABLED, GLLights, i, OpenGLLights::index, index, OpenGLLights::options, and unpicklights().
Referenced by GFXBeginScene().
int _GLLightsEnabled = 0 |
How many lights are enabled (for fast picking)
Definition at line 144 of file gl_light_state.cpp.
Referenced by gfx_light::Create(), gfx_light::Disable(), gfx_light::Enable(), and GFXPickLights().
const float atten0scale = 1 |
Definition at line 141 of file gl_light_state.cpp.
Referenced by gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), and gfx_light::ResetProperties().
Definition at line 142 of file gl_light_state.cpp.
Referenced by gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), and gfx_light::ResetProperties().
Definition at line 143 of file gl_light_state.cpp.
Referenced by gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), and gfx_light::ResetProperties().
Hashtable3d< LineCollideStar, 20, CTACC, lighthuge > lighttable |
table to store local lights, numerical pointers to _llights (eg indices)
Definition at line 145 of file gl_light_state.cpp.
Referenced by GFXDestroyAllLights(), GFXPickLights(), and GFXSetLightContext().