简体   繁体   中英

Delphi XE2: firemonkey and IDirect3DDevice9

How can I access to global IDirect3DDevice9 object in firemonkey 3D form directly ? is it possible ?

Yes, you can have access to DirectX interfaces using these properties:

TCustomDX9Context.SharedDevice: IDirect3DDevice9; | TCustomDX9Context.Direct3D9Obj: IDirect3D9 ;

To access the current context of your application use: ' Form.Context :TContext3D '. TCustomDX9Context is a descendant of TContext3D, you have to test first which context device your application is currently using. It could be one of these classes:

  1. TCustomDX9Context //Windows
  2. TCustomDX10Context //Windows
  3. TCustomContextOpenGL //Mac

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM