如何强制Firemonkey在Delphi XE3中使用DirectX 9上下文?

piX*_*dio 7 delphi directx firemonkey delphi-xe3

Delphi X3中Firemonkey应用程序的主要TForm3D窗口有一个Context:TContext3D可以访问当前使用的设备的窗口.
在我使用Windows7 64的情况下,它总是显示一个TDX10Context对象FMX.Context.DX10.pas.

我无法TDX9Context通过FMX.Context.DX9.pas 从类中创建新实例,只是为了查看祖先TCustomDX9Context.

我发现这个TContextManager类在严格的私有中收集注册的3D上下文TList:(,这是唯一可以调用构造函数的类...

{ Don't call contructor directly from TContext - only using TContextManager class }
constructor CreateFromWindow(const AParent: TFmxHandle; const AWidth, AHeight: Integer;`
Run Code Online (Sandbox Code Playgroud)

他们TContextManager在创建新表单时调用获取上下文,然后使用readonly属性TContextManager.DefaultContextClass.

除了之外,我无法找到对上下文的访问权限DefaultContextClass.

Joh*_*ica 3

作为记录:

将以下行放入您的项目文件中:

GlobalUseDX10 := False;  <<-- add this.
Application.Initialize;  <<-- just before this line.
Run Code Online (Sandbox Code Playgroud)