Windows 環境でのみ使用可能な XNA Framework の型・メンバ

XNA Game Studio Express Beta 2 の XNA Framework は,Win32 用と Xbox 360 用の 2 つのアセンブリが存在します.これらは,単なるファイルの違いだけでなく,一部の型やメソッド・フィールドが Xbox 360 用に含まれていないという大きな差違も含んでいます.
Windows 環境でのみ使用できる型・メンバは,ドキュメントで言及される一方,XML コメントのサマリ欄に"[Windows Only]"と書かれています.使用できない機能は,大まかに次のように分類できます.

  • デザイン時サポート用のクラス (Microsoft.Xna.Framework.Design 以下)
  • 固定機能処理の一部 (Fog 関係のステート)
  • Texture,Effect のファイル I/O
  • Shader の実行時コンパイル
  • Shader Model 3.0 による Geometry Instancing のための SetFrequency

これらの機能を使用する際は,プリプロセッサなどで処理を分岐するか,Content Pipeline を活用してファイル I/O 処理をビルド時に移動させるといった対処が必要になります.
以下,影響を受けるメンバについて具体的にまとめておきました.



型ごと消滅するもの.

Namespace Class Name
Microsoft.Xna.Framework TargetPlatform
Microsoft.Xna.Framework.Design BoundingBoxConverter
BoundingSphereConverter
MathTypeConverter
MatrixConverter
PlaneConverter
PointConverter
QuaternionConverter
RayConverter
RectangleConverter
Vector2Converter
Vector3Converter
Vector4Converter
Microsoft.Xna.Framework.Graphics CompilationFailedException
CompiledEffect
CompiledShader
CompilerIncludeHandler
CompilerMacro
ShaderCompiler
ShaderSemantic
TextureCreationParameters
TextureInformation
CompilerIncludeHandlerType
FilterOptions
FogMode
ImageFileFormat
Microsoft.Xna.Framework.Input Mouse
MouseState



特定のフィールド・メソッドが消滅するもの.

Namespace Type Name Member Type Member Name
Microsoft.Xna.Framework.Audio Audio3DDspSettings Method GetDelayTimes
Microsoft.Xna.Framework.Graphics Effect Method CompileEffectFromFile
CompileEffectFromSource
Disassemble
RenderState Property FogColor
FogDensity
FogEnable
FogEnd
FogStart
FogTableMode
FogVertexMode
RangeFogEnable
ShaderConstantTable Method SetDefaults
Property Version
Texture Method FromFile
GetCreationParameters
GetTextureInformation
Save
VertexStream Method SetFrequencyOfIndexData
SetFrequencyOfInstanceData
SetFrequency