refactoring and cleaning while searching for a problem in the demo code
This commit is contained in:
parent
3471196830
commit
52c077af6c
7 changed files with 47 additions and 22 deletions
|
@ -1,8 +1,6 @@
|
|||
#include "pw/io/image_io.hpp"
|
||||
#include "runtime_lua.hpp"
|
||||
|
||||
|
||||
|
||||
namespace pw {
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
#include "pw/visual/pipeline.hpp"
|
||||
#include "pw/visual/shader.hpp"
|
||||
#include "pw/visual/framebuffer.hpp"
|
||||
#include "pw/visual/texture.hpp"
|
||||
|
||||
#include "pw/core/size.hpp"
|
||||
|
||||
|
||||
#include "runtime_lua.hpp"
|
||||
|
||||
namespace pw {
|
||||
|
@ -17,8 +20,6 @@ void register_visual_function(sol::state&,sol::table &ns)
|
|||
,"draw",&pipeline::draw
|
||||
);
|
||||
|
||||
|
||||
|
||||
ns.new_usertype<shader>("shader"
|
||||
,sol::constructors<shader()>()
|
||||
,"ready",sol::readonly_property(&shader::ready)
|
||||
|
@ -59,6 +60,12 @@ void register_visual_function(sol::state&,sol::table &ns)
|
|||
,"bind",&framebuffer::bind
|
||||
,"unbind",&framebuffer::unbind
|
||||
,"blit",&framebuffer::blit);
|
||||
|
||||
ns.new_usertype<texture>("texture"
|
||||
,sol::constructors<texture(),texture(texture::image_ref,texture::data_layout)>()
|
||||
,"image",sol::property(&texture::set_image,&texture::image)
|
||||
,"type",sol::property(&texture::set_type,&texture::type)
|
||||
);
|
||||
}
|
||||
|
||||
PW_REGISTER_LUA(visual)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue