Jump to content

Josh

Staff
  • Posts

    24,629
  • Joined

  • Last visited

Everything posted by Josh

  1. Has anyone used luabind with Xcode or GCC? I am getting a ton of linker errors like this: Undefined symbols: "_luaL_unref", referenced from: luabind::handle::~handle()in Entity.o luabind::handle::~handle()in Pivot.o luabind::handle::~handle()in AABB.o luabind::handle::~handle()in Mat3.o luabind::handle::~handle()in Mat4.o luabind::handle::~handle()in Plane.o luabind::handle::~handle()in Quat.o luabind::handle::~handle()in Transform.o luabind::handle::~handle()in Vec2.o luabind::handle::~handle()in Vec3.o luabind::handle::~handle()in Vec4.o "luabind::detail::registration::~registration()", referenced from: luabind::detail::property_registration<le3::Entity, le3::Quat le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Quat le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Vec3 le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Vec3 le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Mat4 le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Mat4 le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Entity* le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::property_registration<le3::Entity, le3::Entity* le3::Entity::*, luabind::detail::null_type, luabind::detail::null_type, luabind::detail::null_type>::~property_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Vec3 const&, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Vec3 const&, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(float, float, float), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(float, float, float), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, le3::Vec3 (le3::Entity::*)(bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, le3::Vec3 (le3::Entity::*)(bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, int (le3::Entity::*)(), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, int (le3::Entity::*)(), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(float, float, float, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(float, float, float, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Entity*), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Entity*), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Entity*, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, void (le3::Entity::*)(le3::Entity*, bool), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, bool (le3::Entity::*)(), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::memfun_registration<le3::Entity, bool (le3::Entity::*)(), luabind::detail::null_type>::~memfun_registration()in Entity.o luabind::detail::constructor_registration<le3::Pivot, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Pivot.o luabind::detail::constructor_registration<le3::Pivot, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Pivot.o luabind::detail::constructor_registration<le3::Pivot, luabind::detail::null_type, boost::mpl::v_item<le3::Entity*, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Pivot.o luabind::detail::constructor_registration<le3::Pivot, luabind::detail::null_type, boost::mpl::v_item<le3::Entity*, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Pivot.o luabind::detail::constructor_registration<le3::AABB, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3, boost::mpl::v_item<le3::Vec3, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in AABB.o luabind::detail::constructor_registration<le3::AABB, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3, boost::mpl::v_item<le3::Vec3, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in AABB.o luabind::detail::constructor_registration<le3::AABB, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in AABB.o luabind::detail::constructor_registration<le3::AABB, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in AABB.o luabind::detail::property_registration<le3::AABB, le3::Vec3 le3::AABB::*, luabind::detail::null_type, le3::Vec3 le3::AABB::*, luabind::detail::null_type>::~property_registration()in AABB.o luabind::detail::property_registration<le3::AABB, le3::Vec3 le3::AABB::*, luabind::detail::null_type, le3::Vec3 le3::AABB::*, luabind::detail::null_type>::~property_registration()in AABB.o luabind::detail::property_registration<le3::AABB, float le3::AABB::*, luabind::detail::null_type, float le3::AABB::*, luabind::detail::null_type>::~property_registration()in AABB.o luabind::detail::property_registration<le3::AABB, float le3::AABB::*, luabind::detail::null_type, float le3::AABB::*, luabind::detail::null_type>::~property_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::Vec3 const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::Vec3 const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::AABB const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::AABB const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, void (le3::AABB::*)(le3::AABB const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, void (le3::AABB::*)(le3::AABB const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::AABB const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::AABB const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::AABB::*)() const, luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::AABB::*)() const, luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::Vec3 const&, le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, bool (le3::AABB::*)(le3::Vec3 const&, le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, float (le3::AABB::*)(le3::Vec3 const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::memfun_registration<le3::AABB, float (le3::AABB::*)(le3::Vec3 const&, float), luabind::detail::null_type>::~memfun_registration()in AABB.o luabind::detail::constructor_registration<le3::Mat3, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat3.o luabind::detail::constructor_registration<le3::Mat3, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat3.o luabind::detail::property_registration<le3::Mat3, le3::Vec3 le3::Mat3::*, luabind::detail::null_type, le3::Vec3 le3::Mat3::*, luabind::detail::null_type>::~property_registration()in Mat3.o luabind::detail::property_registration<le3::Mat3, le3::Vec3 le3::Mat3::*, luabind::detail::null_type, le3::Vec3 le3::Mat3::*, luabind::detail::null_type>::~property_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Mat3::*)() const, luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Mat3::*)() const, luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, le3::Mat3 (le3::Mat3::*)(), luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, le3::Mat3 (le3::Mat3::*)(), luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, void (*)(lua_State*, le3::Mat3&, le3::Mat3&), luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::memfun_registration<le3::Mat3, void (*)(lua_State*, le3::Mat3&, le3::Mat3&), luabind::detail::null_type>::~memfun_registration()in Mat3.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<le3::Vec4&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::constructor_registration<le3::Mat4, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Mat4.o luabind::detail::property_registration<le3::Mat4, le3::Vec4 le3::Mat4::*, luabind::detail::null_type, le3::Vec4 le3::Mat4::*, luabind::detail::null_type>::~property_registration()in Mat4.o luabind::detail::property_registration<le3::Mat4, le3::Vec4 le3::Mat4::*, luabind::detail::null_type, le3::Vec4 le3::Mat4::*, luabind::detail::null_type>::~property_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Mat4::*)() const, luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Mat4::*)() const, luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, le3::Mat4 (le3::Mat4::*)(), luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, le3::Mat4 (le3::Mat4::*)(), luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, void (*)(lua_State*, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::memfun_registration<le3::Mat4, void (*)(lua_State*, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~memfun_registration()in Mat4.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::constructor_registration<le3::Plane, luabind::detail::null_type, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<le3::Vec3&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Plane.o luabind::detail::memfun_registration<le3::Plane, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Plane::*)() const, luabind::detail::null_type>::~memfun_registration()in Plane.o luabind::detail::memfun_registration<le3::Plane, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Plane::*)() const, luabind::detail::null_type>::~memfun_registration()in Plane.o luabind::detail::memfun_registration<le3::Plane, void (le3::Plane::*)(), luabind::detail::null_type>::~memfun_registration()in Plane.o luabind::detail::memfun_registration<le3::Plane, void (le3::Plane::*)(), luabind::detail::null_type>::~memfun_registration()in Plane.o luabind::detail::property_registration<le3::Plane, float le3::Plane::*, luabind::detail::null_type, float le3::Plane::*, luabind::detail::null_type>::~property_registration()in Plane.o luabind::detail::property_registration<le3::Plane, float le3::Plane::*, luabind::detail::null_type, float le3::Plane::*, luabind::detail::null_type>::~property_registration()in Plane.o luabind::detail::property_registration<le3::Quat, float le3::Quat::*, luabind::detail::null_type, float le3::Quat::*, luabind::detail::null_type>::~property_registration()in Quat.o luabind::detail::property_registration<le3::Quat, float le3::Quat::*, luabind::detail::null_type, float le3::Quat::*, luabind::detail::null_type>::~property_registration()in Quat.o luabind::detail::constructor_registration<le3::Quat, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Quat.o luabind::detail::constructor_registration<le3::Quat, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Quat.o luabind::detail::memfun_registration<le3::Quat, void (*)(lua_State*, le3::Quat&, le3::Quat&), luabind::detail::null_type>::~memfun_registration()in Quat.o luabind::detail::memfun_registration<le3::Quat, void (*)(lua_State*, le3::Quat&, le3::Quat&), luabind::detail::null_type>::~memfun_registration()in Quat.o luabind::detail::function_registration<le3::Vec3 (*)(le3::Vec3 const&, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~function_registration()in Transform.o luabind::detail::function_registration<le3::Vec3 (*)(le3::Vec3 const&, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~function_registration()in Transform.o luabind::detail::function_registration<le3::Vec3 (*)(float, float, float, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~function_registration()in Transform.o luabind::detail::function_registration<le3::Vec3 (*)(float, float, float, le3::Mat4&, le3::Mat4&), luabind::detail::null_type>::~function_registration()in Transform.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec2, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec2.o luabind::detail::property_registration<le3::Vec2, float le3::Vec2::*, luabind::detail::null_type, float le3::Vec2::*, luabind::detail::null_type>::~property_registration()in Vec2.o luabind::detail::property_registration<le3::Vec2, float le3::Vec2::*, luabind::detail::null_type, float le3::Vec2::*, luabind::detail::null_type>::~property_registration()in Vec2.o luabind::detail::memfun_registration<le3::Vec2, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec2::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec2.o luabind::detail::memfun_registration<le3::Vec2, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec2::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec2.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec3, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec3.o luabind::detail::property_registration<le3::Vec3, float le3::Vec3::*, luabind::detail::null_type, float le3::Vec3::*, luabind::detail::null_type>::~property_registration()in Vec3.o luabind::detail::property_registration<le3::Vec3, float le3::Vec3::*, luabind::detail::null_type, float le3::Vec3::*, luabind::detail::null_type>::~property_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, void (*)(lua_State*, le3::Vec3&, le3::Vec3&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, void (*)(lua_State*, le3::Vec3&, le3::Vec3&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec3::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec3::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, float (le3::Vec3::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, float (le3::Vec3::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, float (le3::Vec3::*)(), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, float (le3::Vec3::*)(), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, le3::Vec3 (le3::Vec3::*)(), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, le3::Vec3 (le3::Vec3::*)(), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, le3::Vec3 (le3::Vec3::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::memfun_registration<le3::Vec3, le3::Vec3 (le3::Vec3::*)(le3::Vec3 const&), luabind::detail::null_type>::~memfun_registration()in Vec3.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<float, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::constructor_registration<le3::Vec4, luabind::detail::null_type, boost::mpl::v_item<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, luabind::detail::null_type>::~constructor_registration()in Vec4.o luabind::detail::property_registration<le3::Vec4, float le3::Vec4::*, luabind::detail::null_type, float le3::Vec4::*, luabind::detail::null_type>::~property_registration()in Vec4.o luabind::detail::property_registration<le3::Vec4, float le3::Vec4::*, luabind::detail::null_type, float le3::Vec4::*, luabind::detail::null_type>::~property_registration()in Vec4.o luabind::detail::memfun_registration<le3::Vec4, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec4::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec4.o luabind::detail::memfun_registration<le3::Vec4, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (le3::Vec4::*)() const, luabind::detail::null_type>::~memfun_registration()in Vec4.o "_lua_toboolean", referenced from: luabind::default_converter<bool>::from(lua_State*, int)in Entity.o
  2. GC was a huge mistake to build into BMX, IMO, and there is nothing you can do to get around this. In a simple program GC lets you code without freeing objects. In a complex program, GC is harder to manage then just freeing things yourself. So garbage collection is basically for idiots who can't even write a simple program.
  3. Tutorials belong in the tutorials section. New users were getting confused by the listings on the wiki page.
  4. Doh! Now it's on the the linker errors...
  5. Disable directional light shadows. The routine can't calculate the light volumes for orthographic projection, because it doesn't make sense.
  6. ld: duplicate symbol _main in Leadwerks Engine 3/build/Leadwerks Engine 3.build/Debug/Leadwerks Engine 3.build/Objects-normal/x86_64/main-64FE42A101277C52.o and Leadwerks Engine 3/build/Leadwerks Engine 3.build/Debug/Leadwerks Engine 3.build/Objects-normal/x86_64/main-64FE42A101277C52.o ???
  7. It's gcc. It works but I have other issues.
  8. It is likely you will continue to produce these errors randomly if you try loading objects in a second thread. It isn't designed to do that. I don't know any way around it. BlitzMax's multithreading implementation is not very good due to the garbage collection system.
  9. I'm getting there...tons of build errors to go through...
  10. I am new to xCode, and trying to include the following header files into a project: <direct.h> <io.h> <sys\stat.h> <sys\types.h> Xcode cannot find any of these. I have not downloaded them or set any search directory pointing to their location. I do not know if these are found on my iMac anywhere. In Visual Studio they get included without doing anything other than typing the name. What do I have to do to make Xcode know where to find these files, and do they need to be downloaded from somewhere? Thanks.
  11. In that case, I can just copy and paste the class header files into one big file.
  12. I am not sure how the header files for linking a static lib work. Do we even need a separate header file to do that?
  13. UU3D can do Crysis models to, and almost everything else. I don't understand how Brad does it. I don't see anything wrong with him playing around with Half-Life models. He paid for the game and should be able to play with the files as long as it stays on his own hard drive. Somebody from Valve or id said the same to me years ago, I forgot who it was.
  14. Josh

    OO Font

    Agreed: GraphicsDriver::DrawText( text, x, y, font )
  15. I wonder if we could do something like this through networking for Windows / Mac / Linux?
  16. That sounds bizarre because a 15 msec measurement is enormous in rendering time. But it wouldn't surprise me. How am I able to measure 1-2 msec time elapses? Wouldn't all my measurements be rounded off to the nearest 15 msecs?
  17. Josh

    Out of OpenGL3Context

    It's a frightening thing when Pancake's suggestions start making it into the core engine design.
  18. Josh

    Out of OpenGL3Context

    There's a chat system built in with that functionality with whisper, team messages, etc. You can also send raw data you interpret yourself. I intend to support file transfers, although that part I have not tried yet. Everything else has been prototyped. A context is like a LE2 graphics window or custom buffer. It's a 3D window so you can draw stuff. Instead of calling BackBuffer() to render to a context, like in LE2, the Context class is an extension of the Buffer class. So you can render directly to the Context or to a Buffer. This cleans up the Graphics/Window/Custom buffer scheme and easily allows rendering to external windows: 1. Create a window. 2. Create a context on window (or on any HWND object). 3. Create a buffer. 4. Render to buffer. 5. Draw buffer image on context with post effects.
  19. Yeah, there's an automated system that goes up in November that will make the process a little nicer for the end user.
  20. Josh

    Out of OpenGL3Context

    Networking is as easy as this: server->BroadcastEntity( Entity ) And then all changes to the entity will be sent out around the network.
  21. Roland is right. I read about the LEAN AND MEAN define statement, but thought it was something in your program source, and didn't know where else to look for it. Good to know. If clock() has milliseconds accuracy on all machines, I'll stick to that one.
  22. Josh

    Out of OpenGL3Context

    My experience from the feedback I have received from a lot of potential customers is that programming has mostly failed as a game design medium. For every programmer out there, there are ten non-programmers who just want to drag some pre-made objects into a scene and watch it go. Furthermore, there is a big difference between being able to type a simple program out and being able to structure a game. Even if you can code the structure of a game so that objects interact with one another in meaningful ways, you have by then specialized your code so much you are alone, and can't share anything with other programmers. Having said that, I don't think anyone has designed a system yet that gets around this problem without turning into Grandma's Game Maker 3D. That is, when you make things easy, you usually get underpowered cookie-cutter results. The system I have in mind still allows low-level programming and per-objects scripts, but provides a visual mechanism to connect objects in meaningful ways. It's good for non-programmers because it allows them to make something. It's good for programmers because it allows them to share scripted objects and provide their services to non-programmers for small tasks. For example, you can make a scripted door object, sell it on the site here (soon) and a non-programmer can drop it in their scene and connect the open/close functionality to other objects, like a button. There does not have to be any code-based scheme for making these items interact. Instead there will be an officially supported method of structuring this, so everyone's items will work together. This means your skills are more marketable, and it is easier to connect people with programming skills to people who want to pay for useful results when they need special items coded. In other words, we can all work together better as a unit to help one another and produce useful results. The interactions system won't take too much time to implement because it is pretty abstract and simple. The more time consuming part will be creating a library of scripts to attach to entities, but I can hire someone else to do most of that. If you just want to program a pure C++ game there is nothing to prevent that.
  23. I spent a lot of time last weekend making sure resources are correctly shared between rendering contexts. It's surprising how many commercial games make you restart the game to switch graphics resolutions, and I find it annoying. Leadwerks Engine 3 uses a small hidden window with an OpenGL context to create the OpenGL 3.3 contexts, and it just stays open so there is always a persistent context with which resources are shared. Textures, shaders, and vertex buffers can all be shared between OpenGL contexts, but oddly, frame buffer objects cannot. This is probably because FBOs are small objects that don't consume large amounts of memory, but it still seems like a strange design choice. I got around this problem by using the persistent background context whenever any FBO commands are called, so buffers will continue to work after you delete a context. So I guess the way to describe that is I start with something that is sort of awkward to work with, and encapsulate it in something that makes more sense, to me at least. Because the background context is created in the OpenGL3GraphicsDriver constructor, you can start calling 3D commands as soon as you create the driver object, without creating a visible 3D window! Weird and cool. No idea yet if it will work like this on MacOS, but I'll find out soon enough, since I ordered my iMac last week. I got the 27-inch model with the 3.2 ghz dual core CPU, and upgraded the GPU to an ATI 5750. I chose the 3.2 ghz dual core over the 2.8 ghz quad core because I have found in general usage, my quad core rarely goes over 50% usage, and I would rather have a faster clock speed per core. I said earlier that the window/context design was a little tricky to figure out, especially when you take into consideration the external windows people will want to use. In Leadwerks Engine 2, this was accomplished via a custom buffer, where callbacks were used to retrieve the context dimensions, and the user was responsible for setting up an OpenGL window. Well, initializing pixel format and OpenGL version on a window is a somewhat tricky thing, and if it's possible I would like to avoid making you deal with that. I ended up with a window design that is quite a lot more advanced than the simple Graphics() command in LE2. The window is created from a GUIDriver, which implies other parts of a cross-platform GUI might one day be included. The design is modeled similarly to MaxGUI for BlitzMax. To create a window, we do this: Gadget* window = CreateWindow("My window",0,0,1024,768,NULL,WINDOW_FULLSCREEN) Then you can create a graphics context on the window (or any other gadget): Context* context = GraphicsDriver->CreateContext(window) We can check for events in our game loop like this: while (PeekEvent()) { Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: return 0; } } At this time, windows are the only supported gadget, but the framework is there for adding additional gadgets in the future. This system can also be used to implement the skinned game GUI as well as native interface elements. Before Rick says anything, yes, there will be a custom event handler function you can attach to a gadget instead of polling events. You can render to an external window just by supplying the HWND (on Windows) to the GUIDriver->CreateGadget(HWND hwnd) command. This will create a "Gadget" object from any valid hwnd, and it can then have a context created on it, like the above example. Simple deferred lighting is working, just using a directional light with no shadows. On both AMD and NVidia cards, the engine can render 16x MSAA deferred lighting. The gbuffer format in Leadwerks Engine 3 is only 12 bytes per pixel. Per-pixel motion blur will add a couple more bytes: color0 (RGBA8) diffuse.r diffuse.g diffuse.b specular intensity color1 (RG11B10) normal.x normal.y normal.z color2 (RGBA8) emission.r emission.g emission.b materialid Material properties are sent in an array to the GPU, and the material ID is used to look up properties like specular reflection color, gloss value, etc. So this is a very efficient usage of texture bandwidth. My GEForce 9800 GTX can handle 1920x1080 with 8x MSAA, but 16x seems to go over a threshold and the card crawls. I don't know if you'll be using 16x MSAA in a lot of games, but if nothing else it makes for fantastic screen shots, and the lower resolution antialias options are still there. I personally don't see a big improvement past 4x multisampling in most games. Here's my current test program. It's more low-level than you will have to work with. You won't have to create the gbuffer and draw lighting yourself like I am here, but you might like seeing how things work internally: #include "le3.h" using namespace le3; int main() { InitFileFactories(); //Create GUI driver GUIDriver* guidriver = new WindowsGUIDriver; //Create a window Gadget* window = guidriver->CreateWindow("Leadwerks",0,0,1024,768,NULL,WINDOW_TITLEBAR|WINDOW_RESIZABLE); if (!window) { Print("Failed to create window"); return 0; } //Create graphics driver GraphicsDriver* graphicsdriver = new OpenGL3GraphicsDriver; if (!graphicsdriver->IsSupported()) { Print("Graphics driver not supported."); return 0; } //Create a graphics context Context* context = CreateContext(window,0); if (!context) { Print("Failed to create context"); return 0; } //Create world World* world = new World; //Create a camera Camera* camera = CreateCamera(); camera->SetClearColor(0.5,0.5,0.5,1); //Load a model LoadModel("Models/train_sd40.mdl"); //Create gbuffer #define SAMPLES 16 Buffer* gbuffer = CreateBuffer(context->GetWidth(),context->GetHeight(),1,1,SAMPLES); Texture* normals = CreateTexture(context->GetWidth(),context->GetHeight(),TEXTURE_RGB_PACKED,0,1,SAMPLES); Texture* emission = CreateTexture(context->GetWidth(),context->GetHeight(),TEXTURE_RGBA,0,1,SAMPLES); gbuffer->SetColor(normals,1); gbuffer->SetColor(emission,2); delete normals; delete emission; //Set up light shader Shader* lightshader = LoadShader("shaders/light/directional.shd"); Mat4 lightmatrix = Mat4(1,0,0,0, 0,1,0,0, 1,0,0,0, 0,0,0,1); lightmatrix *= camera->mat; lightshader->SetUniformMat4("lightmatrix",lightmatrix); lightshader->SetUniformVec4("lightcolor",Vec4(1,0,0,1)); lightshader->SetUniformVec4("ambientlight",Vec4(0,0,0,1)); lightshader->SetUniformVec2("camerarange",camera->range); lightshader->SetUniformFloat("camerazoom",camera->zoom); //Delete and recreate the graphics context, just because we can //Resources are shared, so you can change screen resolution with no problems delete context; delete window; window = guidriver->CreateWindow("Leadwerks",200,200,1024,768,NULL,WINDOW_TITLEBAR|WINDOW_RESIZABLE); context = CreateContext(window,0); float yaw = 0; while (true) { //Print(graphicsdriver->VidMemUsage()); if (!window->Minimized()) { yaw +=0.25; //Adjust the camera camera->SetPosition(0,0,0,false); camera->SetRotation(0,yaw,0,false); camera->Move(0,2,-10,false); //Update the time step UpdateTime(); //Render to buffer gbuffer->Enable(); camera->Render(); //Switch back to the window background context->Enable(); //Enable shader and bind textures lightshader->Enable(); gbuffer->depthcomponent->Bind(0); gbuffer->colorcomponent[0]->Bind(1); gbuffer->colorcomponent[1]->Bind(2); gbuffer->colorcomponent[2]->Bind(3); //Draw image onto window graphicsdriver->DrawRect(0,0,context->GetWidth(),context->GetHeight()); //Turn the shader off lightshader->Disable(); //Swap the back buffer context->Swap(false); } //Handle events while (PeekEvent()) { Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWRESTORE: ResumeTime(); break; case EVENT_WINDOWMINIMIZE: PauseTime(); break; case EVENT_WINDOWSIZE: //Recreate the gbuffer delete gbuffer; gbuffer = CreateBuffer(context->GetWidth(),context->GetHeight(),1,1,SAMPLES); normals = CreateTexture(context->GetWidth(),context->GetHeight(),TEXTURE_RGB_PACKED,0,1,SAMPLES); emission = CreateTexture(context->GetWidth(),context->GetHeight(),TEXTURE_RGBA,0,1,SAMPLES); gbuffer->SetColor(normals,1); gbuffer->SetColor(emission,2); delete normals; delete emission; break; case EVENT_WINDOWCLOSE: //Print OpenGL error to make sure nothing went wrong Print(String(glGetError())); //Exit program return 0; } } } } There's been some debate about the use of constructors, and although it would be nice to be able to use a constructor for everything, but that does not seem possible. I use a lot of abstract classes, and there is no way to use an abstract class constructor to create an object. If there was a way to turn the object into a derived class in its own constructor, that would work, but it's not supported. You certainly wouldn't want to have to call new OpenGL3Buffer, new DirectX11Buffer, new OpenGL4Buffer depending on the graphics driver. The point of abstract classes is so you can just call their commands without knowing or caring what their derived class is. So if anyone has any other ideas, I'm all ears, but there doesn't seem to be any other way around this. What's next? I need to get some text up onscreen, and the FreeType library looks pretty good. I'll be getting the Mac version set up soon. And I am eager to get the engine working together with BlitzMax, so I can work on the editor. The graphics features of LE3 are great, but I think there are two even more important aspects. The first is the art pipeline. I've designed a system that is the absolute easiest way to get assets into the engine. More details will come later, but let's just say it's heavy on the drag and drop. The other important aspect of LE3 is the interactions system. I have concluded that programming, while necessary, is a lousy way of controlling interactions between complex objects. The Lua implementation in LE2 was good because it provided a way for people to easily share programmed objects, but its the interactions of objects that make a system interesting, and a lot of object-oriented spaghetti is not a way to handle this. Using the interactions system in LE3 with inputs and outputs for each object is something that I think people will really like working with.
  24. There was a bunch of dead links, and there's a separate tutorials section on the site, which new users found confusing. I actually didn't mean to delete the tools section, so I restored that.
×
×
  • Create New...