Quote: "The only thing that I get is an occasional occurrence of SteamVR not starting the compositor which I think is usually caused when you stop a running application and try to restart it again before it has had a chance to reset itself."
Yes, this makes sense and is probably what's happening.
Quote: "Quote: "If I set up a basic scene but don't render anything, I get a windows crash. Just adding a plane or a box or something and it doesn't crash - weird!?"
"
Here's an example:
If I uncomment the skybox or load an object, it's fine.
// Project: _VR_Environment
// Created: 2017-08-18
#import_plugin AGKVR
// show all errors
SetErrorMode(2)
SetWindowTitle( "_VR_Environment" )
SetWindowSize( 1024, 768, 0 )
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetSyncRate(0,0)
UseNewDefaultFonts(1) // since version 2.0.22 we can use nicer default fonts
global testPlane as Integer
global lefthandID as Integer
SetGenerateMipmaps( 1 )
//SetSkyBoxHorizonColor( 200, 200, 255 )
//SetSkyBoxHorizonSize( 10, 2 )
//SetSkyBoxSkyColor( 50, 50, 255)
//SetSkyBoxSunColor( 255,255,255 )
//SetSkyBoxVisible( 1 )
//SetSkyBoxSunSize( 1, 3.0 )
//SetSkyBoxSunVisible( 1 )
//testplane=CreateObjectPlane(100,40)
//SetObjectLookAt(testPlane,0,0,0,0)
//SetObjectPosition(testPlane,0,0,40)
//lefthandID=LoadObject("/media/left_controller_body.lwo")
AGKVR.SetCameraRange( 0.01, 1000.0 )
AGKVR.ErrorMessagesOn(1)
InitError As Integer
RightEyeImg As Integer = 500
LeftEyeImg As Integer = 501
InitError = AGKVR.Init( RightEyeImg, LeftEyeImg )
// InitError = 0: SUCCESS!
// InitError = 1: Unable to init VR runtime
// InitError = 2: Compositor initialization failed.
AGKVR.UpdatePlayer( )
AGKVR.ResetSeatedZeroPose()
AGKVR.SetPlayerPosition(0,.25,-.2)
AGKVR.SetPlayerRotation(0,0,0)
do
AGKVR.UpdatePlayer( )
// SetObjectPosition( lefthandID, AGKVR.GetLeftHandX(), AGKVR.GetLeftHandY(), AGKVR.GetLeftHandZ())
//SetObjectRotation( lefthandID, AGKVR.GetLeftHandAngleX(), AGKVR.GetLeftHandAngleY(), AGKVR.GetLeftHandAngleZ())
//This command renders to the HMD.
AGKVR.Render( )
//The camera's position and rotation will determine what is displayed on the monitor, not the HMD
SetCameraPosition( 1, AGKVR.GetHMDX(), AGKVR.GetHMDY(), AGKVR.GetHMDZ())
SetCameraRotation( 1, AGKVR.GetHMDAngleX(), AGKVR.GetHMDAngleY(), AGKVR.GetHMDAngleZ())
Print( ScreenFPS() )
Sync()
loop