In SlimDX and DX9 what is the suffix “Ex” that is on the end of some classes mean?

StackOverflow https://stackoverflow.com/questions/12630775

  •  04-07-2021
  •  | 
  •  

質問

I have noticed that in the SlimDX.Direct3D9 namespace there is a lot of classes and methods with two different versions. One version has an Ex suffix. I think this is true of the DX9 API as well.

For example:

SlimDX.Direct3D9.Device

SlimDX.Direct3D9.DeviceEx

SlimDX.Direct3D9.DisplayMode

SlimDX.Direct3D9.DisplayModeEx

役に立ちましたか?

解決

Ex-tended is how I've always read it in my head (although it could be wrong).

C does not have overloading so if the API is updated to account for extra stuff not originally accounted for, such as a new option field, enter in FooEx. (The same reasoning applies to new types, even though the overloading is not applicable.)

While other languages do have overloads, wrappers may keep the Ex convention to better mirror the underlying source API, including using the "annotation" on types.

This naming convention is consistently used across large portions of Win-C/Microsoft API, but could have been Foo2, had that been the convention.

他のヒント

DirectX9Ex is mostly an improvement for DirectX9, adding new features for Windows Vista and later versions only (the most notable being the ability to share resources).

There's a few incompatibilities between each, for example when creating resources you have to be careful of which pool you choose (Pool.Managed with work with Device but you need Pool.Default with DeviceEx )

If you need to share textures across processes, DeviceEx is you only option, otherwise standard Device will do just fine.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top