
#include "pw/core/debug.hpp"
#include "pw/visual/pipeline.hpp"
#include "pw/visual/shader.hpp"

#include "runtime_lua.hpp"

namespace pw {

void register_visual_function(sol::state&,sol::table &ns)
{

	ns.new_usertype<pipeline>("pipeline"
							  ,"create",&pipeline::create
							  ,"draw",&pipeline::draw
                              );

	ns.new_usertype<shader>("shader"
							,"ready",sol::readonly_property(&shader::ready)
							,"use",&shader::use
							,"build",&shader::build
							,"set_source",&shader::set_source
							,"source",&shader::source
							).new_enum("shader_type"
									   ,"fragment",shader::code_type::fragment
									   ,"vertex",shader::code_type::vertex);
}

PW_REGISTER_LUA(visual)

}
