58 lines
1.1 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. //
  11. // The LolFx class
  12. // ---------------
  13. //
  14. #if defined HAVE_CONFIG_H
  15. # include "config.h"
  16. #endif
  17. #if defined _XBOX
  18. # define _USE_MATH_DEFINES /* for M_PI */
  19. # include <xtl.h>
  20. # undef near /* Fuck Microsoft */
  21. # undef far /* Fuck Microsoft again */
  22. #elif defined _WIN32
  23. # define _USE_MATH_DEFINES /* for M_PI */
  24. # define WIN32_LEAN_AND_MEAN
  25. # include <windows.h>
  26. # undef near /* Fuck Microsoft */
  27. # undef far /* Fuck Microsoft again */
  28. #endif
  29. #include "core.h"
  30. #include "gpu/lolfx-compiler.h"
  31. namespace lol
  32. {
  33. LolFx::LolFx()
  34. : m_blend(false),
  35. m_alphatest(false),
  36. m_cullface(false),
  37. m_depthtest(false),
  38. m_depthmask(false),
  39. m_shader(0)
  40. {
  41. ;
  42. }
  43. bool LolFx::Compile(char const *command)
  44. {
  45. LolFxCompiler lc(*this);
  46. return lc.ParseString(command);
  47. }
  48. } /* namespace lol */