light.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #include "light.h"
  2. #include "collision.h"
  3. #include "renderer.h"
  4. //=====================================================================================================================================
  5. // RenderSphere =
  6. //=====================================================================================================================================
  7. static void RenderSphere( const mat4_t& tsl, const vec3_t& col )
  8. {
  9. glPushMatrix();
  10. r::MultMatrix( tsl );
  11. r::Color3( col );
  12. r::dbg::RenderSphere( 1.0/8.0, 8 );
  13. glPopMatrix();
  14. }
  15. //=====================================================================================================================================
  16. // Render =
  17. //=====================================================================================================================================
  18. void point_light_t::Render()
  19. {
  20. RenderSphere( transformation_wspace, diffuse_color );
  21. }
  22. //=====================================================================================================================================
  23. // Render =
  24. //=====================================================================================================================================
  25. void spot_light_t::Render()
  26. {
  27. RenderSphere( transformation_wspace, diffuse_color );
  28. }