1

Looking through the defined surface formats of SlimDX, some seem to be missing. I'm interested in using the NV12 format.

Since the formats are defined as an enum, I can't pass in a FOURCC format as I would be able to using unmanaged code.

Is there any way to work around this?

Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161

1 Answers1

1

SlimDX enums are defined as ints, so you can cast any int to it.

int nvformat = 12345; //Replace number by the fourcc
SlimDX.Direct3D9.Format fmt = (SlimDX.Direct3D9.Format)nvformat;
mrvux
  • 8,523
  • 1
  • 27
  • 61