예제 #1
0
        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);
        }
예제 #2
0
        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);
        }        
예제 #3
0
        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);
        }
예제 #4
0
  /* virtual */ void
  triangle::print_on(std::ostream& os) const
  {
    TRACE_NEVER("geometry::triangle::print_on");

    os << '{' << p0 << ',' << p1 << ',' << p2 << '}';
  }
예제 #5
0
파일: base.cpp 프로젝트: regnirpsj/dcs08961
    /* virtual */ void
    base::data::print_on(std::ostream& os) const
    {
      TRACE_NEVER("render::stats::base::data::print_on");

      os << "[render::stats::base::data]";
    }
예제 #6
0
파일: base.cpp 프로젝트: regnirpsj/dcs08961
    /* 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);
 }
예제 #8
0
        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;
        }
예제 #9
0
        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);
        }
예제 #10
0
파일: base.cpp 프로젝트: regnirpsj/dcs08961
    /* 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" << ']';
    }
예제 #11
0
        /* 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");
        }
예제 #12
0
        /* 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");
        }
예제 #13
0
파일: base.cpp 프로젝트: regnirpsj/dcs08961
    /* virtual */ void
    base::print_on(std::ostream& os) const
    {
      TRACE_NEVER("platform::application::base::print_on");

      os << '['
         << "@0x"      << this << ','
         << "verbose:" << verbose_level_
         << ']';
    }
예제 #14
0
        /* 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());
        }
예제 #15
0
파일: base.cpp 프로젝트: regnirpsj/dcs08961
    /* virtual */ void
    base::print_on(std::ostream& os) const
    {
      TRACE_NEVER("render::state::base::print_on");

      field::container::print_on(os);

      os << "\b,"
         << ctx_
         << ']';
    }
예제 #16
0
        /* 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();
        }
예제 #17
0
    /* 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"
         << ']';
    }
예제 #18
0
      /* 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_
           << ']';
      }
예제 #19
0
        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;
        }
예제 #20
0
        /* 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 << ']';
        }
예제 #21
0
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;
}
예제 #22
0
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;
}
예제 #23
0
파일: dfs.cpp 프로젝트: regnirpsj/dcs08961
 /* virtual */ void
 dfs::print_on(std::ostream&) const
 {
   TRACE_NEVER("scene::visitor::dfs::print_on");
 }