variable; otherwise they will be ignored as no built-in expression references
them.
*/
-class ProgramBuilder
+class DEPRECATED ProgramBuilder
{
public:
/**
/** Use a skylight component for ambient lighting. */
bool skylight;
+ bool fog;
+
/** Use a specular lighting component. */
bool specular;
/** Use a normal map texture. Only used if lighting is true. */
- bool normalmap;
+ bool normal_map;
/** Use a shadow map. Requires a ShadowMap effect or equivalent in the
pipeline. */
equivalend in the pipeline. */
bool reflection;
+ /** Clip primitives against user defined clip planes. */
+ bool clipping;
+
+ /** Number of clipping planes to process. */
+ unsigned max_clip_planes;
+
+ /** Use a geometry shader. */
+ bool geometry;
+
/** Force the use of legacy shaders conforming to GLSL 1.10. Defaults
to true if the version of GLSL is less than 1.30, false otherwise. */
bool legacy;
{
NO_SCOPE,
TYPE,
+ FUNCTION,
UNIFORM,
ATTRIBUTE,
VERTEX,
- FRAGMENT
+ GEOMETRY,
+ FRAGMENT,
+ N_SCOPES
};
enum InterfaceFlags
NO_INTERFACE = 0,
INPUT = 1,
OUTPUT = 2,
- PASSTHROUGH = INPUT|OUTPUT,
GOAL = 4
};
InterfaceFlags get_interface_flags(VariableScope) const;
std::string create_type_declaration() const;
std::string create_declaration(char = 0, bool = false) const;
- std::string create_replacement(VariableScope, const char * = 0) const;
- std::string create_expression(const char * = 0) const;
+ std::string create_replacement(VariableScope, unsigned, const char * = 0) const;
+ std::string create_expression(unsigned, const char * = 0) const;
};
enum MatchType
StandardFeatures features;
std::list<VariableDefinition> custom_variables;
std::string feature_flags;
+ unsigned enabled_scopes;
std::map<std::string, std::string> aliases;
bool optimize;
static bool parse_identifier(const char *, unsigned &, unsigned &);
static std::vector<std::string> extract_identifiers(const char *);
static std::string replace_identifiers(const char *, const std::map<std::string, std::string> &, bool = false);
+ static VariableScope previous_scope(VariableScope, unsigned);
std::string create_expression(const ShaderVariable &, const char * = 0) const;
};