示例#1
0
void shade::shaders::PerStageGettable<T>::get_default_inline(formatter::Generator& generator)
{
    generator.handle_return_begin();
    T<shade::Type> type;
    type.generate_constructor(generator);
    generator.handle_return_end();
}
示例#2
0
文件: list_impl.cpp 项目: 4og/avango
void shade::list_base<Container, Qualifier>::generate_constructor(formatter::Generator& generator, boost::shared_ptr<Type::State> state) const
{
  State* list_state = dynamic_cast<State*>(get_pointer(state));
  if (!list_state)
    return;

  generator.handle_literal_list(list_state->index, list_state->index+m_container.size());
}
示例#3
0
void shade::shaders::VertexToFragmentCopy<T>::get_fragment_inline(formatter::Generator& generator) const
{
  std::string class_name(VertexToFragmentCopy::get_class_name());

  generator.handle_return_begin();
  generator.handle_function_call_begin();
  generator.handle_function_call_name_begin();
  generator.handle_identifier(class_name+"_get_copy");
  generator.handle_function_call_name_end();
  generator.handle_function_call_parameter_list_begin();
  generator.handle_function_call_parameter_begin();
  generator.handle_identifier("self");
  generator.handle_function_call_parameter_end();
  generator.handle_function_call_parameter_list_end();
  generator.handle_function_call_end();
  generator.handle_return_end();
}
示例#4
0
void shade::shaders::VertexToFragmentCopy<T>::init_vertex_inline(formatter::Generator& generator) const
{
  std::string class_name(VertexToFragmentCopy::get_class_name());

  generator.handle_statement_begin();
  generator.handle_function_call_begin();
  generator.handle_function_call_name_begin();
  generator.handle_identifier(class_name+"_set_copy");
  generator.handle_function_call_name_end();
  generator.handle_function_call_parameter_list_begin();
  generator.handle_function_call_parameter_begin();
  generator.handle_identifier("self");
  generator.handle_function_call_parameter_end();
  generator.handle_function_call_parameter_begin();
  {
    generator.handle_function_call_begin();
    generator.handle_function_call_name_begin();
    generator.handle_identifier("Gettable_"+T<Type>().get_uniq_id()+"_get");
    generator.handle_function_call_name_end();
    generator.handle_function_call_parameter_list_begin();
    generator.handle_function_call_parameter_begin();
    generator.handle_identifier("value");
    generator.handle_function_call_parameter_end();
    generator.handle_function_call_parameter_list_end();
    generator.handle_function_call_end();
  }
  generator.handle_function_call_parameter_end();
  generator.handle_function_call_parameter_list_end();
  generator.handle_function_call_end();
  generator.handle_statement_end();
}
示例#5
0
void ObjectSpace::get_inline(formatter::Generator& generator)
{
  generator.handle_environment_begin(fragment_shader);
  generator.handle_return_begin();
  generator.handle_function_call_begin();
  generator.handle_function_call_name_begin();
  generator.handle_identifier("ObjectSpace_get_position");
  generator.handle_function_call_name_end();
  generator.handle_function_call_parameter_list_begin();
  generator.handle_function_call_parameter_begin();
  generator.handle_identifier("self");
  generator.handle_function_call_parameter_end();
  generator.handle_function_call_parameter_list_end();
  generator.handle_function_call_end();
  generator.handle_return_end();
  generator.handle_environment_end();
  generator.handle_return_begin();
  generator.handle_literal_vec3(0, 0, 0);
  generator.handle_return_end();
}
示例#6
0
void shade::vec2<Qualifier>::generate_constructor(formatter::Generator& generator) const
{
    generator.handle_literal_vec2(m_x, m_y);
}
示例#7
0
文件: vec3_impl.cpp 项目: 4og/avango
template<class Qualifier> void shade::vec3<Qualifier>::generate_constructor(formatter::Generator& generator) const
{
  generator.handle_literal_vec3(m_x, m_y, m_z);
}
示例#8
0
文件: list_impl.cpp 项目: 4og/avango
void shade::list_base<Container, Qualifier>::generate_constructor(formatter::Generator& generator) const
{
  generator.handle_literal_list(0, 0);
}
示例#9
0
void shade::float_<Qualifier>::generate_constructor(formatter::Generator& generator) const
{
    generator.handle_literal_float(m_value);
}
示例#10
0
void shade::shaders::PerStageGettable<T>::get_inline(formatter::Generator& generator)
{
    std::string class_name(PerStageGettable::get_class_name());

    generator.handle_environment_begin(vertex_stage);
    generator.handle_return_begin();
    generator.handle_function_call_begin();
    generator.handle_function_call_name_begin();
    generator.handle_identifier(class_name + "_get_vertex");
    generator.handle_function_call_name_end();
    generator.handle_function_call_parameter_list_begin();
    generator.handle_function_call_parameter_begin();
    generator.handle_identifier("self");
    generator.handle_function_call_parameter_end();
    generator.handle_function_call_parameter_list_end();
    generator.handle_function_call_end();
    generator.handle_return_end();
    generator.handle_environment_end();

    generator.handle_environment_begin(fragment_stage);
    generator.handle_return_begin();
    generator.handle_function_call_begin();
    generator.handle_function_call_name_begin();
    generator.handle_identifier(class_name + "_get_fragment");
    generator.handle_function_call_name_end();
    generator.handle_function_call_parameter_list_begin();
    generator.handle_function_call_parameter_begin();
    generator.handle_identifier("self");
    generator.handle_function_call_parameter_end();
    generator.handle_function_call_parameter_list_end();
    generator.handle_function_call_end();
    generator.handle_return_end();
    generator.handle_environment_end();

    generator.handle_environment_begin(geometry_stage);
    generator.handle_return_begin();
    generator.handle_function_call_begin();
    generator.handle_function_call_name_begin();
    generator.handle_identifier(class_name + "_get_geometry");
    generator.handle_function_call_name_end();
    generator.handle_function_call_parameter_list_begin();
    generator.handle_function_call_parameter_begin();
    generator.handle_identifier("self");
    generator.handle_function_call_parameter_end();
    generator.handle_function_call_parameter_list_end();
    generator.handle_function_call_end();
    generator.handle_return_end();
    generator.handle_environment_end();

    get_default_inline(generator);
}