Ocular Engine
GPULight.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_CORE_GPU_LIGHT__H__
19 #define __H__OCULAR_CORE_GPU_LIGHT__H__
20 
21 #include "Math/Vector4.hpp"
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Core
36  {
37  class LightSource;
38 
44  struct GPULight
45  {
46  GPULight();
47 
48  void operator()(LightSource const* light);
49 
52  Math::Vector4f color;
55  };
56  }
60 }
65 //------------------------------------------------------------------------------------------
66 
67 #endif
Definition: Matrix3x3.hpp:39
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Math::Vector4f attenuation
.x = constant; .y = linear; .z = quadratic; .w = range
Definition: GPULight.hpp:53
Math::Vector4f position
Position of the light source in world space. Used by point and spot lights.
Definition: GPULight.hpp:50
Structure of generic light data passed to the GPU.
Definition: GPULight.hpp:44
Math::Vector4f parameters
.x = intensity; .y = angle (spotlight); .z = type (1 = point, 2 = spot, 3 = directional); ...
Definition: GPULight.hpp:54
Definition: LightSource.hpp:43
Math::Vector4f direction
Direction to the light source. Used by directional and spot lights.
Definition: GPULight.hpp:51