Sign in to follow this  
mdx

[SlimDX] Lightsetup Error on Vista 64-Bit

Recommended Posts

I've tried to run a directional light in DirectX9 on Windows Vista 64-Bit. The demo was compield. It runs without problems on WinXP. The error ist thrown by Setlight. SlimDX.Direct3D9.Direct3D9Exception: D3DERR_INVALIDCALL: Invalid call (-2005530516) at SlimDX.Result.Throw[T](Object dataKey, Object dataValue) at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue) at SlimDX.Result.Record[T](Int32 hr, Object dataKey, Object dataValue) at SlimDX.Direct3D9.Device.SetLight(Int32 lightIndex, Light lightData) Visual Basic
Private _directional As New Light

        With _directional
            .Type = LightType.Directional
            .Ambient = Color.FromArgb(255, 30, 30, 30)
            .Diffuse = Color.White
            .Specular = Color.CornflowerBlue
            .Direction = New Vector3(0.5, -0.6, 0)
        End With

dxDevice.SetLight(0, _directional)

thx for help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this