buf.Write(byte[] buffer): Can't convert to byte[]

Hi. I'm writing a code that houses a sky class for showing a skycube.

The skyV is a PositionTextured data type and PositionTextured struct is in a DirectX.Direct3D.CustomVertex namespace in the Managed DirectX/.net 2.0.

The problem is, I can't write the vertex data to the GraphicsBuffer which is renamed from GraphicsStream in MDX/.net 1.1.

Here's the code:


Answer this question

buf.Write(byte[] buffer): Can't convert to byte[]

  • SAStumpf

    Questions about MDX 2.0 should be asked in the beta newsgroups. See http://msdn.com/directx/beta for more information.

    But to give you a starting point you should take a look at the new generic GraphicsBuffer class and the generic Lock method.

    PS: You should not create a 32 bit index buffer and try to fill it with 8 bit indices. This will not work.



  • Mark AC

    Oh...never mind.

    Thank you.

    I'll be switching to MDX 1.1 until MDX 2.0 gets released out of beta state.

    PS: The buf.Write() method has a byte[] argument and I had to change from int[] to a byte[].



  • buf.Write(byte[] buffer): Can't convert to byte[]