25 #if defined(REQUIRE_GL_ES)
40 spot_direction(spot_direction_),
41 range(float(pow(2.0
f, 100.0
f))),
43 constant_attenuation(1.0
f),
44 linear_attenuation(0.0
f),
45 quadratic_attenuation(0.0
f),
46 spot_theta(2*Global::
pi),
47 spot_phi(2*Global::
pi)
51 #ifndef DISABLE_GL_FIXED
76 #ifndef DISABLE_GL_SHADER
79 set(number, reinterpret_cast<Video_GL_Fixed &>(vgl));
85 screen.
get_d3d_device()->SetLight(number, reinterpret_cast<const D3DLIGHT9 *>(
this));
Point3f position
The position of the Light (irrelevant for directional lights or purely ambient lights) ...
Color diffuse
The diffuse Color.
The Direct3D9 Rendering System.
LPDIRECT3DDEVICE9 & get_d3d_device()
See DirectX Documentation for details.
LIGHT_TYPE light_type
The type of the Light.
Color specular
The specular Color.
void set(const GLenum &number, Video_GL_Fixed &screen) const
float spot_exponent
Similar to Falloff in OpenGL, describes the intensity of the Light from the inner cone to the outer c...
A 3D Point represented with floats.
float constant_attenuation
Part of the equation describing the weakening of Light over distance. Read online for more informatio...
#define GL_CONSTANT_ATTENUATION
#define GL_SPOT_DIRECTION
A Featureful 3-Space Vector Class.
The OpenGL Rendering System.
const float pi
pi == 3.1415926...
#define GL_LINEAR_ATTENUATION
The OpenGL Rendering System.
typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex
float linear_attenuation
Part of the equation describing the weakening of Light over distance. Read online for more informatio...
float spot_phi
The angle, in radians, describing the size of the outer cone (automatically decreases theta if necess...
Light(const Color &ambient=Color(1.0f, 0.0f, 0.0f, 0.0f), const Color &diffuse=Color(1.0f, 1.0f, 1.0f, 1.0f), const Color &specular=Color(1.0f, 1.0f, 1.0f, 1.0f), const Point3f &position=Point3f(0.0f, 0.0f, 0.0f), const Vector3f &spot_direction=Vector3f(0.0f, 0.0f,-1.0f))
An Alternative to the numerous setter functions.
float quadratic_attenuation
Part of the equation describing the weakening of Light over distance. Read online for more informatio...
Point3f spot_direction
The direction of the Light (relevent only to spotlights)
#define GL_QUADRATIC_ATTENUATION
Color ambient
The ambient Color.