relativ
relativ

Reputation: 665

Delphi XE2: firemonkey and IDirect3DDevice9

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

Upvotes: 1

Views: 425

Answers (1)

piXelicidio
piXelicidio

Reputation: 197

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!

Upvotes: 1

Related Questions