1

We have a platform using VCL TFrame as rendering surface for OpenGL.

Using FireMonkey, is there any way to achieve the same thing? I've found a few examples of an entire FMX.Forms.TForm being hijacked to render OpenGL to but that's not really what I want.

Is this really a "Sorry, no can do"? I've tried creating a dummy TForm and use it's DC to cerate an OpenGL rendering context and then blit over to a FMX.Types.TImage or somehting similar but I failed trying that approach as well.

Has anyone done this? Or is FireMonkey only for non-CAD applications?

RRUZ
  • 130,998
  • 15
  • 341
  • 467
DelphiDabber
  • 295
  • 2
  • 12
  • See related: http://stackoverflow.com/questions/7744540/how-to-setup-opengl1-4-environment-in-firemonkey-app – Kromster Oct 01 '13 at 07:21

1 Answers1

2

As FireMonkey exists presently, there's no EASY way of talking directly to a FireMonkey OpenGL context (that's presuming you're using the hack to force OpenGL mode on Windows, as Direct2D/3D is used by default with no official option to switch to OGL).

What you can do, however, is create your own OpenGL context by talking directly to the OpenGL API (or by using a cross-platform middleware layer like GLEW or GLUT). There's absolutely nothing stopping a FireMonkey application from creating its own OpenGL context, even "parenting" the OGL Render Window to the inside of a FireMonkey 2D Form (doing the same on a 3D Form would be a hell of a challenge, though).

Good luck in whichever route you choose to take!

LaKraven
  • 5,676
  • 2
  • 21
  • 49
  • It was the "on a 3D Firemonkey form" thing I was trying to achieve. I tried some more but got nowhere. The hack for making FireMonkey use OpenGL under Windows eluded me; I couldn't find that either. Experiment closed. – DelphiDabber Oct 24 '12 at 09:41