source: trunk/src/gpu/lolfx.cpp @ 1937

Last change on this file since 1937 was 1937, checked in by sam, 7 years ago

lolfx: names such as "x" or "bgra" are field selectors, but we must also
accept them as variable names.

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2012 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://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
12// The LolFx class
13// ---------------
14//
15
16#if defined HAVE_CONFIG_H
17#   include "config.h"
18#endif
19
20#if defined _XBOX
21#   define _USE_MATH_DEFINES /* for M_PI */
22#   include <xtl.h>
23#   undef near /* Fuck Microsoft */
24#   undef far /* Fuck Microsoft again */
25#elif defined _WIN32
26#   define _USE_MATH_DEFINES /* for M_PI */
27#   define WIN32_LEAN_AND_MEAN
28#   include <windows.h>
29#   undef near /* Fuck Microsoft */
30#   undef far /* Fuck Microsoft again */
31#endif
32
33#include "core.h"
34#include "gpu/lolfx-compiler.h"
35
36namespace lol
37{
38
39LolFx::LolFx()
40  : m_blend(false),
41    m_alphatest(false),
42    m_cullface(false),
43    m_depthtest(false),
44    m_depthmask(false),
45    m_shader(0)
46{
47    ;
48}
49
50bool LolFx::Compile(char const *command)
51{
52    LolFxCompiler lc(*this);
53    return lc.ParseString(command);
54}
55
56} /* namespace lol */
57
Note: See TracBrowser for help on using the repository browser.