glm::vec4 base::world_to_eye(glm::vec4 const& a) const { TRACE_NEVER("hugh::render::software::pipeline::base::world_to_eye"); return (*xform_view * a); }
glm::vec3 base::clip_to_ndc(glm::vec4 const& a) const { TRACE_NEVER("hugh::render::software::pipeline::base::clip_to_ndc"); return glm::vec3(a.x / a.w, a.y / a.w, a.z / a.w); }
glm::vec4 base::eye_to_clip(glm::vec4 const& a) const { TRACE_NEVER("hugh::render::software::pipeline::base::eye_to_clip"); return (*xform_projection * a); }
/* virtual */ void triangle::print_on(std::ostream& os) const { TRACE_NEVER("geometry::triangle::print_on"); os << '{' << p0 << ',' << p1 << ',' << p2 << '}'; }
/* virtual */ void base::data::print_on(std::ostream& os) const { TRACE_NEVER("render::stats::base::data::print_on"); os << "[render::stats::base::data]"; }
/* virtual */ void base::print_on(std::ostream& os) const { TRACE_NEVER("render::stats::base::print_on"); os << *(fetch()); }
/* virtual */ void application::print_on(std::ostream& os) const { TRACE_NEVER("win::application::print_on"); support::application::single_instance::print_on(os); }
std::ostream& operator<<(std::ostream& os, base::statistics const& a) { TRACE_NEVER("hugh::render::software::pipeline::operator<<(base::statistics)"); std::ostream::sentry const cerberus(os); if (cerberus) { boost::io::ios_all_saver const ias(os); static unsigned const width(7); os << '[' << "v:" << std::setw(width) << a.vertices.transformed << ",f:" << std::setw(width) << a.fragments.created << ",c:" << std::setw(width) << a.fragments.zculled << ",s:" << std::setw(width) << a.fragments.shaded << ",z:" << std::setw(width) << a.fragments.ztestfailed << ",p:" << std::setw(width) << a.fragments.updated << ']'; } return os; }
glm::vec4 base::object_to_world(glm::vec4 const& a) const { TRACE_NEVER("hugh::render::software::pipeline::base::object_to_world"); return (*xform_model * a); }
/* virtual */ void base::print_on(std::ostream& os) const { TRACE_NEVER("scene::visitor::base::print_on"); os << '[' << "'scene::visitor::base::print_on' not yet implemented" << ']'; }
/* virtual */ void base::print_on(std::ostream&) const { TRACE_NEVER("hugh::support::ostream::printable::base::print_on(std::ostream)"); throw std::logic_error("pure virtual function " "'hugh::support::ostream::printable::base::print_on' called"); }
/* virtual */ void base::process(primitive::base const&) { TRACE_NEVER("hugh::render::software::pipeline::base::process"); throw std::logic_error("pure virtual function " "'hugh::render::software::pipeline::base::process' called"); }
/* virtual */ void base::print_on(std::ostream& os) const { TRACE_NEVER("platform::application::base::print_on"); os << '[' << "@0x" << this << ',' << "verbose:" << verbose_level_ << ']'; }
/* virtual */ void base::print_on(std::wostream& wos) const { TRACE_NEVER("hugh::support::ostream::printable::base::print_on(std::wostream)"); std::ostringstream ostr; print_on(ostr); wos << string_to_wstring(ostr.str()); }
/* virtual */ void base::print_on(std::ostream& os) const { TRACE_NEVER("render::state::base::print_on"); field::container::print_on(os); os << "\b," << ctx_ << ']'; }
/* virtual */ glm::vec3 base::ndc_to_window(glm::vec3 const&) const { TRACE_NEVER("hugh::render::software::pipeline::base::ndc_to_window"); throw std::logic_error("pure virtual function " "'hugh::render::software::pipeline::base::ndc_to_window' " "called"); return glm::vec3(); }
/* virtual */ void context::print_on(std::ostream& os) const { TRACE_NEVER("render::ogl::context::print_on"); render::context::device::print_on(os); render::context::swap::print_on (os); os << "\b," << "render::ogl::context" << ']'; }
/* virtual */ void standard::print_on(std::ostream& os) const { TRACE_NEVER("render::ogl::pass::standard::print_on"); render::pass::base::print_on(os); os << "\b,\n" << setup_ << ",\n" << clear_ << ",\n" << draw_ << ",\n" << swap_ << ']'; }
base::statistics& base::statistics::operator+=(statistics const& a) { TRACE_NEVER("hugh::render::software::pipeline::base::statistics::operator+="); fragments.created += a.fragments.created; fragments.zculled += a.fragments.zculled; fragments.shaded += a.fragments.shaded; fragments.ztestfailed += a.fragments.ztestfailed; fragments.updated += a.fragments.updated; vertices.transformed += a.vertices.transformed; return *this; }
/* virtual */ void xcb::print_on(std::ostream& os) const { TRACE_NEVER("hugh::render::vulkan::window::xcb::print_on"); os << '['; window::base::print_on(os); os << ','; platform::xcb::window::simple::print_on(os); os << ']'; }
std::string demangle(std::type_info const& tinfo, std::nothrow_t const&) noexcept { TRACE_NEVER("support::demangle(std::nothrow_t)"); std::string result(tinfo.name()); try { result = demangle(tinfo); } catch (std::exception const&) { /* do nothing */ } return result; }
std::string demangle(std::type_info const& tinfo) { TRACE_NEVER("support::demangle"); std::string result(tinfo.name()); #if defined(__GNUC__) { signed status(0); char* const demangled_name(abi::__cxa_demangle(tinfo.name(), 0, 0, &status)); result = demangled_name; std::free(demangled_name); switch (status) { case -1: // memory allocation failure throw std::bad_alloc(); break; case -2: // not a valid name under the C++ ABI mangling rules throw std::domain_error("<support::demangle/abi::__cxa_demangle>: " "invalid mangled type name"); break; case -3: // One of the arguments is invalid throw std::invalid_argument("<support::demangle/abi::__cxa_demangle>: " "invalid arguments"); break; } } #endif return result; }
/* virtual */ void dfs::print_on(std::ostream&) const { TRACE_NEVER("scene::visitor::dfs::print_on"); }