DirectX SDK Sample Converting Effects to VB

Hello all,

I'm converting the DirectX SDK sample framework to VB code.
It's going great so far, but i'm getting cought up on converting some lights code.

Assume variable eye is a Vector3 containing camera eye point; and effect is a DirectX effect created from the sdk file 'BasicHLSL_VBNET.fx'

The code in the C# reads as follows...


Vector3 eyePt = Vector3.Normalize(eye);
effect.SetValue("g_LightDir", &eyePt,sizeof(Vector3));

When i convert this to VB...


Dim eyePtAs Vector3 = Vector3.Normalize(eye)
effect.SetValue("g_LightDir", eyePt)

There's only 1 problem...
The VB managed code of DirectX doesn't allow to set a Vector3 as a effect argument type. It only allows for Boolean, Integer, Single, Vector4, ColorValue, Matrix, String, and BaseTexture.

I hope there's some DirectX guru's out there.

[1591 byte] By [Dustin_H] at [2007-12-16]
# 1

ZMan has already converted the SDK Samples to VB.net, including a version for VS2005, here is the link http://www.thezbuffer.com/articles/187.aspx

Mykre
www.ircomm.net - Managed DirectX and Game Programming Resources

Mykre at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

I'm impressed. I got about 65% of it converted before i got stuck.
I wish i had just asked before i started now Tongue Tied

they don't have the effects samples on the site, so i think i'll still recode them with the new vb framework from the link you've supplied.

Thanks.

Dustin_H at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Not a problem, glad to help.

Mykre
www.ircomm.net - Managed DirectX and Game Programming Resources

Mykre at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...