Common.h 798 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <anki/Gr.h>
  7. #include <anki/util/Ptr.h>
  8. namespace anki {
  9. // Forward
  10. class Renderer;
  11. class Ms;
  12. class Is;
  13. class Fs;
  14. class Lf;
  15. class Ssao;
  16. class Sslf;
  17. class Tm;
  18. class Bloom;
  19. class Pps;
  20. class Dbg;
  21. class Tiler;
  22. class Ir;
  23. class Refl;
  24. /// Cut the job submition into multiple chains. We want to avoid feeding
  25. /// GL with a huge job chain
  26. const U RENDERER_COMMAND_BUFFERS_COUNT = 2;
  27. /// Computes the 'a' and 'b' numbers for linearizeDepthOptimal
  28. inline void computeLinearizeDepthOptimal(F32 near, F32 far, F32& a, F32& b)
  29. {
  30. a = (far + near) / (2.0 * near);
  31. b = (near - far) / (2.0 * near);
  32. }
  33. } // end namespace anki