Exemple #1
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);
}
Exemple #2
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();
}