Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
362 commits
Select commit Hold shift + click to select a range
8ab6ed0
add ifdefs around an iostream include
rpavlik Jun 28, 2011
991044e
run astyle on osgLua library
rpavlik Jun 28, 2011
9f8fa00
astyle most of the osglua examples
rpavlik Jun 28, 2011
957937c
Improve includes - thanks to include-what-you-use
rpavlik Jul 7, 2011
f16f5cc
some osgLua improvements based on report of IWYU
rpavlik Jul 7, 2011
0f13aa1
more include improvements
rpavlik Jul 7, 2011
8cd68c5
include improvements in osgLua
rpavlik Jul 7, 2011
961025b
fix the luabind lua_State forward decl
rpavlik Jul 7, 2011
f7da355
Add an extra template param to luabind default_converter
rpavlik Jul 8, 2011
9faddf0
Also add an Enable templ param to type_to_string
rpavlik Jul 8, 2011
b1a8b92
add a missing include
rpavlik Jul 8, 2011
f2d3e0e
Use template metaprogramming to deduce whether a type is an osg ref t…
rpavlik Jul 8, 2011
214fe42
improve osgLuaBind type_to_string conversion
rpavlik Jul 8, 2011
e7c51a7
use boost's headers to indicate lua_State isn't derived.
rpavlik Jul 8, 2011
fda8c09
add missing include
rpavlik Jul 8, 2011
fc3e93c
traits-based osgluabind connection for value types
rpavlik Jul 8, 2011
1f5b72f
split forward declaration out of the public macro
rpavlik Jul 8, 2011
1344976
remove boatanchor
rpavlik Jul 8, 2011
18bd27a
recognize more value types
rpavlik Jul 8, 2011
29d644e
macro for verbose output
rpavlik Jul 8, 2011
ba08fc1
more removal of duplication in osgLuaBind
rpavlik Jul 8, 2011
c8f306b
fixed a typo in a template
rpavlik Jul 8, 2011
f91e46d
clean up the ref converter
rpavlik Jul 8, 2011
6dec84e
clean up the val converter with a typedef
rpavlik Jul 8, 2011
0e52c51
use a typedef for the base of the hierarchy
rpavlik Jul 8, 2011
9b5c151
update year
rpavlik Jul 8, 2011
539ce0d
comment the code in osgLuaBind
rpavlik Jul 8, 2011
ac0ba80
turn on verbosity in the osgpointers test
rpavlik Jul 8, 2011
74d3d02
clarify the verbose output
rpavlik Jul 8, 2011
c3bbb35
give osgLuaBind its own verbosity ifdef
rpavlik Jul 8, 2011
f63cbb4
improve comments
rpavlik Jul 8, 2011
36e8faa
Add boost software license
rpavlik Aug 11, 2011
83133c8
run astyle
rpavlik Aug 11, 2011
fb9c751
add astylerc file
rpavlik Aug 11, 2011
94152b2
fix clang build error
rpavlik Jul 8, 2011
8d20678
add generated introspection header include wrappers
rpavlik Jul 12, 2011
ae720df
move introspection wrapping headers
rpavlik Jul 12, 2011
d35d55f
add a missing #endif
rpavlik Jul 12, 2011
e6bfae1
switch to using osgLua::introspection namespace in osgLua
rpavlik Jul 12, 2011
3f5d9d7
adjust vrjugglua to the new osgLua method of accessing introspection
rpavlik Jul 12, 2011
159b2f7
catch exceptions when looking for osg::Vec3 info
rpavlik Jul 12, 2011
554827e
catch exceptions in two places
rpavlik Jul 12, 2011
9f4c86e
fix build of luascript
rpavlik Jul 29, 2011
6bd3b9c
remove manual osghelpers
rpavlik Jul 29, 2011
6bfb7cb
don't add generated config header to IDE projects
rpavlik Jul 29, 2011
130d94d
don't stamp target with version
rpavlik Jul 29, 2011
6e92cd9
remove unused argument
rpavlik Jul 29, 2011
a87f0ac
update util header
rpavlik Jul 29, 2011
e3afaa9
improve include dirs and library linking
rpavlik Aug 11, 2011
b2881a2
inlining
rpavlik Aug 11, 2011
afb41f5
update luabind
rpavlik Aug 11, 2011
436d579
luabind cast graph fix
rpavlik Aug 11, 2011
2af734a
improve testing arguments for cppcheck
rpavlik Aug 11, 2011
797011d
handle disappearing cppcheck just fine
rpavlik Aug 11, 2011
60fc9db
Revert "inlining"
rpavlik Aug 11, 2011
85095d4
some lua-path cleanup
rpavlik Aug 11, 2011
9456469
fix cppcheck message on a dummy cpp
rpavlik Aug 11, 2011
90f9007
split function pointer typedefs for luabind into separate file
rpavlik Aug 11, 2011
79e9360
a bit of cleanup to LuaScript
rpavlik Aug 11, 2011
2d9f3c9
astyle pointer test
rpavlik Aug 11, 2011
9c19c9c
astyle bindings
rpavlik Aug 11, 2011
9c9758b
remove unnecessary header text from cmakelists.txt
rpavlik Aug 11, 2011
8ec6a82
make copyright and dates consistent
rpavlik Aug 11, 2011
2ae3bbd
remove unnecessary arguments to doxygen @file
rpavlik Aug 11, 2011
f05f4de
clean filenames when generating include graph
rpavlik Aug 11, 2011
cb08e38
update include data
rpavlik Aug 11, 2011
502912a
added learning examples
Aug 12, 2011
325176d
edited example files - added ShapeDrawables Script to advanced
Aug 12, 2011
8aa37cc
correction: DrawableShapes.lua is in examples/in-progress
Aug 12, 2011
3bf0d9d
Merge pull request #1 from lpberg/master
rpavlik Aug 15, 2011
206ae32
add a template class for simple C++ lua userdata
rpavlik Sep 21, 2011
1416100
Start on the IndexedPropertyProxy
rpavlik Sep 21, 2011
c6b2267
let normal folks push instance methods
rpavlik Sep 21, 2011
7db2053
Work on the indexed proerpty proxy
rpavlik Sep 21, 2011
0d496bb
change how we define __index
rpavlik Sep 21, 2011
09171cd
fix pop calls
rpavlik Sep 21, 2011
851af0d
need value header
rpavlik Sep 21, 2011
9b47306
stub impl
rpavlik Sep 21, 2011
74a3d41
fix typo
rpavlik Sep 21, 2011
66170f3
need to use &
rpavlik Sep 21, 2011
a49ef16
bad_alloc is in <new>
rpavlik Sep 21, 2011
bcf3908
fix copy-and-pasteo
rpavlik Sep 21, 2011
af0b172
wait before deciding the size to allocate
rpavlik Sep 21, 2011
dd8c0de
cast retrieved userdata pointer
rpavlik Sep 21, 2011
04e9fc0
different way of doing garbage collection
rpavlik Sep 21, 2011
cc8bf68
comment out unneeded stuff
rpavlik Sep 21, 2011
e684bd4
use functions that exist
rpavlik Sep 21, 2011
6de97d8
typo
rpavlik Sep 21, 2011
d649612
cleanup
rpavlik Sep 21, 2011
4ee4ef0
actually return our allocation
rpavlik Sep 21, 2011
164c644
change how looking to decide if a indexed property
rpavlik Sep 21, 2011
c3d9fe1
use indexed property proxy
rpavlik Sep 21, 2011
67e4551
add a basic pushnew
rpavlik Sep 21, 2011
da213d7
add a missing return
rpavlik Sep 21, 2011
8b5a33d
properly call derived class method
rpavlik Sep 21, 2011
c45bb13
return luaL_error, for style
rpavlik Sep 21, 2011
0304b52
create IPP metatable on load
rpavlik Sep 21, 2011
66fd0c6
actually set the metatable of userdata
rpavlik Sep 21, 2011
fcbac34
for userdata, just allocate space for a pointer, rather than the whol…
rpavlik Sep 21, 2011
e70bca0
store an actual osgIntrospection::Value in the property proxy
rpavlik Sep 21, 2011
130ae81
don't remove the userdata from the stack when calling an instance method
rpavlik Sep 21, 2011
15b3d93
move work on IPP
rpavlik Sep 21, 2011
01ce5ff
implement insert
rpavlik Sep 21, 2011
4763ca1
optional verbosity for luauserdata
rpavlik Sep 22, 2011
4007cef
can actually push an instance closure if you like
rpavlik Sep 22, 2011
62d6f4e
ok, IPP works
rpavlik Sep 22, 2011
bcd0b64
add vec3array test
rpavlik Sep 22, 2011
84d9440
add test for basic wrappers
rpavlik Sep 22, 2011
0a4584d
add more to the vec3array test
rpavlik Sep 22, 2011
63cd154
range check when accessing
rpavlik Sep 22, 2011
0ecc7c2
check bottom of range too
rpavlik Sep 22, 2011
79349a6
improve error message
rpavlik Sep 22, 2011
76477bd
allow insert with newindex
rpavlik Sep 22, 2011
53e95c9
astyle
rpavlik Sep 22, 2011
86f348b
print the help of vec3array
rpavlik Sep 22, 2011
6c4722a
clean up
rpavlik Sep 23, 2011
a6b34e1
split out pushing an item at an index
rpavlik Sep 23, 2011
e548ae4
improve errors
rpavlik Sep 23, 2011
48977a9
add a remove method, not yet connected
rpavlik Sep 23, 2011
6befa3a
private inheritance
rpavlik Sep 23, 2011
68d226b
rename a method
rpavlik Sep 23, 2011
370ca1d
update help for array props
rpavlik Sep 23, 2011
e7d1cf1
locally handle methods
rpavlik Sep 23, 2011
f238265
add test of removing
rpavlik Sep 23, 2011
1d88c13
add tests for things that shouldn't work
rpavlik Sep 23, 2011
f325573
insert a try/catch
rpavlik Sep 23, 2011
2b3be4f
remove accidental cerr
rpavlik Sep 23, 2011
286a8e7
remove commented out line
rpavlik Sep 23, 2011
4a6d4b3
link lua against libm
rpavlik Sep 29, 2011
8e6c06c
shouldn't necessarily require that things in an indexed property aren…
rpavlik Sep 30, 2011
1184280
add some examples in-progress for creating geometry
rpavlik Sep 30, 2011
09ccf65
Merge branch 'master' of github.com:vance-group/vr-jugglua
rpavlik Oct 3, 2011
01f366c
load openthreads wrapper by default too
rpavlik Oct 3, 2011
e62e189
find the jccl and vrjuggler plugins too, not just sonix and gadget
rpavlik Oct 3, 2011
85b238c
install debug plugins only when in debug mode
rpavlik Oct 3, 2011
d9956ff
fix typo in osgLua
rpavlik Oct 10, 2011
930d23a
cache property name locally
rpavlik Oct 10, 2011
90d7a1c
improve indexed property errors
rpavlik Oct 10, 2011
fa80dab
add some more try-catch to indexed property proxy
rpavlik Oct 10, 2011
51eefa4
clean up an in-progress example
rpavlik Oct 10, 2011
3549d4c
tidy up LuaScript.cpp verbosity
rpavlik Oct 10, 2011
0fc2daf
add a missing try-catch
rpavlik Oct 10, 2011
bc75572
make actions more robust in error cases
rpavlik Oct 10, 2011
b615cce
a little cleanup
rpavlik Oct 10, 2011
b7690d2
Merge branch 'master' of github.com:vance-group/vr-jugglua
rpavlik Oct 10, 2011
c9a998e
replace duplicated string literals with method calls
rpavlik Oct 12, 2011
c657660
A little cleanup and renaming
rpavlik Oct 12, 2011
d7d9fa9
improve comments
rpavlik Oct 12, 2011
ce041af
add assertions
rpavlik Oct 12, 2011
e129405
add a todo
rpavlik Oct 12, 2011
ff67ada
add assert
rpavlik Oct 12, 2011
117cbe8
use the lua-cpp-utils version of LuaUserdata.h
rpavlik Oct 12, 2011
2cfb686
simplify simple type pushing in osgLua
rpavlik Oct 12, 2011
b766c18
rename Indexed Property Proxy to ArrayPropertyProxy
rpavlik Oct 12, 2011
08affd1
lua errors are idiomatically "return"'ed
rpavlik Oct 12, 2011
f4b82bf
clarify some property-related code
rpavlik Oct 12, 2011
d6eae24
remove boatanchors and clean comments
rpavlik Oct 12, 2011
3e68b0e
run codespell
rpavlik Oct 13, 2011
d3a34ed
fix build on gcc
rpavlik Oct 13, 2011
708d02d
add custom converters to make numeric precision conversion easy
rpavlik Oct 13, 2011
78f7700
start to add tests for vector conversion
rpavlik Oct 13, 2011
59aa7b4
add test of calling member
rpavlik Oct 13, 2011
e73d99e
check the getcompatiblemethod
rpavlik Oct 13, 2011
d7bb46f
check both invoking and finding
rpavlik Oct 13, 2011
a004167
add another osgpointers test
rpavlik Oct 13, 2011
8141b25
add another vector test
rpavlik Oct 13, 2011
9cdc3ae
astyle
rpavlik Oct 13, 2011
edac9cb
enable more tests
rpavlik Oct 13, 2011
86f8c3d
work on converting matrices
rpavlik Oct 13, 2011
b4cf8b8
Rename numeric conversion test
rpavlik Oct 13, 2011
1fdc2b5
enumerate numeric conversion tests
rpavlik Oct 13, 2011
06e5239
simplify numeric converters
rpavlik Oct 13, 2011
ea4eeb3
No need for converter proxies to be static
rpavlik Oct 13, 2011
590f2f3
command line parsing - run the action, not the table, for a recognize…
rpavlik Oct 12, 2011
0c8fab1
add test for failure in property handling found when working on rainb…
rpavlik Oct 12, 2011
8d4091f
reduce max speed
rpavlik Oct 12, 2011
95b1795
Merge branch 'master' into numeric-precision-conversion
rpavlik Oct 14, 2011
5c577cb
ifdef some cluster verbosity
rpavlik Oct 14, 2011
ac748e4
simplify luauserdata interface
rpavlik Oct 14, 2011
86bd34a
astyle
rpavlik Oct 14, 2011
1f8fbbf
Add navigation redesign spec
rpavlik Oct 18, 2011
9cf84fb
add navigation specs for transform access and physics, and an assumption
rpavlik Oct 18, 2011
7942061
Improve document structure
rpavlik Oct 18, 2011
7e01d11
Improve spec structure by providing a short "title" for each
rpavlik Oct 18, 2011
28cd24d
add note about two roots
rpavlik Oct 18, 2011
6af2d05
Add introductions and improve structure
rpavlik Oct 18, 2011
d082a60
add some definitions
rpavlik Oct 18, 2011
f24d2bf
use a note to mention how to ref the assumptions
rpavlik Oct 18, 2011
b8435c3
add info on the coordinate frame convention
rpavlik Oct 18, 2011
cb99121
insert references to definitions and clean up.
rpavlik Oct 18, 2011
b09efa4
indicate use of "shall" preferred
rpavlik Oct 18, 2011
4a8c74e
change participants section
rpavlik Oct 18, 2011
7109681
Add requirement and assumption about examples
rpavlik Oct 18, 2011
c02eabd
fix bug in Simple_Object_Orientation.lua example - thanks to @jmvance…
rpavlik Oct 19, 2011
5a85286
Change order of examples in README
rpavlik Oct 19, 2011
9fffef1
Update README with info about mailing list
rpavlik Oct 19, 2011
0327281
Only register new converters that are necessary
rpavlik Oct 25, 2011
e0f3649
Merge branch 'numeric-precision-conversion'
rpavlik Oct 25, 2011
e4c70fb
improve how we update cmake module path
rpavlik Oct 25, 2011
ce172e8
make sure we search for boost system
rpavlik Oct 25, 2011
89eebc2
Use boost::get_pointer in osgLuaBind
rpavlik Nov 2, 2011
4fd55c5
use is_base_and_derived for consistency and clarity
rpavlik Nov 2, 2011
c77c597
Use boost::true_type and false_type instead of making our own
rpavlik Nov 2, 2011
d4d21bf
Comment out a hack I no longer understand.
rpavlik Nov 2, 2011
e88537a
stub in what I think might fix things.
rpavlik Nov 2, 2011
7f481a9
Add comments to test build file
rpavlik Nov 2, 2011
2cd264e
Use launcher for the c++ tests
rpavlik Nov 2, 2011
8fbd947
add test case for setting Matrixd
Nov 4, 2011
1567fb0
fix comments for running the correct test group
Nov 11, 2011
40138e6
fix missing parens in test
Nov 11, 2011
3346482
Create explicit construction methods for GL number types.
rpavlik Nov 14, 2011
1c07e57
Factor out duplicated code from osgLua/CustomConverters
rpavlik Nov 14, 2011
1648388
Add convert from int to float and double
rpavlik Nov 14, 2011
0334d85
add some debug output
rpavlik Nov 14, 2011
f060dbe
Add explicit numeric type insertion test.
rpavlik Nov 14, 2011
3c4fc79
Add output proxies for C++
rpavlik Nov 14, 2011
6f3bd9b
clarify namespace
rpavlik Nov 14, 2011
13f9bf5
move methods out of class into their own separate section
Nov 15, 2011
ebc265d
Merge remote-tracking branch 'vance-github/fix-osgluabind-value-types'
rpavlik Nov 29, 2011
0fc0a73
add example where model can be attached to the wand
Dec 9, 2011
cc0170c
If a type is a value type, so are its const reference relatives.
rpavlik Dec 12, 2011
de54c1b
Have to pop our extra metatable when registering.
rpavlik Dec 12, 2011
46839b6
Make a Lua error (catching an exception) when trying to access a type…
rpavlik Dec 12, 2011
7278cf3
Catch any other osgIntrospection errors in that method too.
rpavlik Dec 12, 2011
928137b
Remove old saved session
rpavlik Dec 12, 2011
d130690
Fix display list test
rpavlik Dec 13, 2011
c838a5a
Add the stackchecker.
rpavlik Dec 13, 2011
8da8743
Use the stackchecker in the array prop proxy userdata.
rpavlik Dec 13, 2011
e5ec098
Default to VR Juggler 3.0
rpavlik Dec 13, 2011
76b7548
Add a binary readme to the snapshot builds.
rpavlik Dec 13, 2011
a47bb30
Rename the binary readme file to simplify
rpavlik Dec 13, 2011
11051d5
Initial markdown processing
rpavlik Dec 13, 2011
6037ded
Add discount v2.1.2 binary for Windows
rpavlik Dec 13, 2011
b053950
Add markdown targets to ALL
rpavlik Dec 13, 2011
da5356b
Fix Markdown target installing.
rpavlik Dec 13, 2011
3e219d4
Install binary readme using the markdown target installer
rpavlik Dec 13, 2011
8839599
added basic factory model for lighting example
Dec 13, 2011
3a53954
added basic factory model for lighting example
Dec 13, 2011
824a3b7
added lighting script under advanced examples
Dec 13, 2011
4946f67
added lighting script under advanced examples
Dec 13, 2011
b92f85e
edited lighting example to correct poor variable names and fixed spel…
Dec 13, 2011
a56d663
edited lighting example to correct poor variable names and fixed spel…
Dec 13, 2011
148c5d3
created examples/5-audio/ folder for audio related examples, added a …
Dec 14, 2011
e746c9a
created examples/5-audio/ folder for audio related examples, added a …
Dec 14, 2011
a9e8359
added a sound example with commented lines - plays a WAV by default.
Dec 14, 2011
3eba4f8
added a sound example with commented lines - plays a WAV by default.
Dec 14, 2011
bd148bb
Merge branch 'master' of github.com:lpberg/vr-jugglua
Dec 15, 2011
8a27c9a
Merge branch 'master' of github.com:lpberg/vr-jugglua
Dec 15, 2011
a8acf78
Merge branch 'master' of github.com:lpberg/vr-jugglua
Dec 15, 2011
c1e1295
added default lighting to nav-app-skeleton.lua
Dec 19, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions examples/5-audio/Ambient_Sound_Example.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--require getScriptFilename so we can add current path to modelSearch Path
require("getScriptFilename")
vrjLua.appendToModelSearchPath(getScriptFilename())

--find the path of an MP3 file and store it in "mp3Path" variable
mp3Path = vrjLua.findInModelSearchPath("SampleMP3.mp3")
--find the path of a WAV file and store it in "wavPath" variable
wavPath = vrjLua.findInModelSearchPath("SampleWAV.wav")

--In order to play the sound, we need to change to the correct API (must uncomment one of the following)
--1)Use OpenAL for WAV files
snx.changeAPI("OpenAL")
--2)Use Audiere for MP3 files
--snx.changeAPI("Audiere")

--create a sound info object
soundInfo = snx.SoundInfo()
-- set the filename attribute of the soundFile (path to your sound file)
soundInfo.filename = wavPath
--create a new sound handle and pass it the filename from the soundInfo object
soundHandle = snx.SoundHandle(soundInfo.filename)
--configure the soundHandle to use the soundInfo
soundHandle:configure(soundInfo)
--play or "trigger" the sound
soundHandle:trigger(1)
Binary file added examples/5-audio/SampleMP3.mp3
Binary file not shown.
Binary file added examples/5-audio/SampleWAV.wav
Binary file not shown.
68 changes: 68 additions & 0 deletions examples/advanced/light_example.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
require("getScriptFilename")
vrjLua.appendToModelSearchPath(getScriptFilename())

--load in an example model (so we can see the effect of our lights)
factory = Transform{
orientation = AngleAxis(Degrees(-90), Axis{1.0, 0.0, 0.0}),
scale = ScaleFrom.inches,
Model("../models/basicfactory.ive")
}
--add example model 'factory' to the scene graph
RelativeTo.World:addChild(factory)


-- need thw RelativeTo.World's state set to turn on our lights int the scene
worldStateSet = RelativeTo.World:getOrCreateStateSet()

function createLight1()
-- create a light object
light1 = osg.Light()
-- set light number (openGL and osg can have up to eight lights in a scene #0-7)
light1:setLightNum(0)
-- create a lightsource object
lightsource1 = osg.LightSource()
-- turn the light source on
lightsource1:setLocalStateSetModes(osg.StateAttribute.Values.ON)
-- set light l1 to light source ls1
lightsource1:setLight(light1)

--set light attributes
light1:setAmbient(osg.Vec4(0.8, 0.8, 0.8, 0.5))
light1:setDiffuse(osg.Vec4(0.8, 0.8, 0.8, 0.8))
light1:setSpecular(osg.Vec4(0.8, 0.8, 0.8, 0.8))

-- turn the light on in the relativeto.world state set
worldStateSet:setAssociatedModes(light1, osg.StateAttribute.Values.ON)
--add lightsource to scene (room)
RelativeTo.Room:addChild(lightsource1)
-- set position of light
light1:setPosition(osg.Vec4(0, 3, -5, 1.0))
end

function createLight2()
-- create a light object
light2 = osg.Light()
-- set light number (openGL and osg can have up to eight lights in a scene #0-7)
light2:setLightNum(1)
-- create a lightsource object
lightsource2 = osg.LightSource()
-- turn the light source on
lightsource2:setLocalStateSetModes(osg.StateAttribute.Values.ON)
-- set light light2 to lightsource lightsource2
lightsource2:setLight(light2)
--set light attributes
light2:setAmbient(osg.Vec4(.8, .8, 0.6, .50))

-- turn the light on in the relativeto.world state set
worldStateSet:setAssociatedModes(light2, osg.StateAttribute.Values.ON)

--add lightsource to scene (room)
RelativeTo.Room:addChild(lightsource2)
-- set position of light
light2:setPosition(osg.Vec4(1.5, 2, 2, 1.0))
end

--calls to turn create lights functions (by extension creates them and turns them ON)
createLight1()
createLight2()

Binary file added examples/models/basicfactory.ive
Binary file not shown.
26 changes: 26 additions & 0 deletions vrjugglua/lua/nav-app-skeleton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,30 @@ function osgnav:latePreFrame()
end
end

function osgnav:setupDefaultLighting()
WorldStateSet = RelativeTo.World:getOrCreateStateSet()
--Light 0
light0 = osg.Light()
light0:setAmbient(osg.Vec4(0.8, 0.8, 0.8, 0.8))
lightsource0 = osg.LightSource()
lightsource0:setLight(light0)
lightsource0:setLocalStateSetModes(osg.StateAttribute.Values.ON)
WorldStateSet:setAssociatedModes(light0, osg.StateAttribute.Values.ON)
RelativeTo.Room:addChild(lightsource0)
light0:setPosition(osg.Vec4(0, 10, 0, 1.0))

--Light 1
light1 = osg.Light()
light1:setLightNum(1)
light1:setAmbient(osg.Vec4(.8, .8, 0.6, .50))
lightsource1 = osg.LightSource()
lightsource1:setLight(light1)
lightsource1:setLocalStateSetModes(osg.StateAttribute.Values.ON)
WorldStateSet:setAssociatedModes(light1, osg.StateAttribute.Values.ON)
RelativeTo.Room:addChild(lightsource1)
light1:setPosition(osg.Vec4(1.5, 2, 0, 1.0))
end


print("Setting up scenegraph")
navtransform = osg.PositionAttitudeTransform()
Expand All @@ -86,6 +110,8 @@ osgnav.appProxy:setAppDelegate(osgnav)
print("Setting kernel application")
osgnav.appProxy:setActiveApplication()

print("Setting up default Lighting. Override OpenGL Light #0 & #1")
osgnav:setupDefaultLighting()



Expand Down