ref counting with std::shared_ptr seems to work and also is handed through with sol

This commit is contained in:
Hartmut Seichter 2018-12-28 00:34:39 +01:00
parent dd23fa811a
commit ae37273021
4 changed files with 41 additions and 24 deletions

View file

@ -46,21 +46,35 @@ local n_2 = pw.node.new("node-2")
print("node 1: ", n_1.name)
print("node 2: ", n_2.name)
print(pw.node.create())
--print(pw.node.create())
print("node children ",n_1:children())
n_1:add_child(pw.node.create()).name = "one"
n_1:add_child(pw.node.create()).name = "two"
n_1:add_child(pw.node.create()).name = "three"
n_1:add_child(pw.node.create()).name = "four"
n_1:add_child(pw.node.create()).name = "five"
--n_1:add_child(n_2:shared())
print("node 1 - child count ",n_1.child_count)
for i = 1,n_1.child_count do
print(i,n_1.children[i],n_1.children[i].name)
end
--print(n_1:shared())
--print(pw.my_func())
--n_1:add_child()
--local w = pw.window.new()
local w = pw.window.new()
--while w:update()
--do
-- -- print("update")
--end
w.title = "pixwerx 1.0"
while w:update()
do
-- print("update")
end
--local scene = pw:scene.new()