Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: OpenGL - Initialising with XE2

  1. #11
    Quote Originally Posted by AthenaOfDelphi View Post
    Yeah, I looked into wglCreateContext and wglMakeCurrent. The problem is, I can't seem to find an equivalent when I enable the OS X build platform. If I recall correctly, for these two call I add WinAPI.OpenGL to the uses, but I can't seem to find an equivalent for Mac. Any suggestions?
    In Embarcadero's Delphi XE 2 folder you can look at "FMX.Context.Mac.pas", which has the initialization code for Mac.

    Quote Originally Posted by AthenaOfDelphi View Post
    To be honest, I'm amazed they elected to use Direct X for FireMonkey on Windows. Why not just use OpenGL on all platforms?
    I've written about this before. The curious thing is that they use latest headers for Mac but outdated OpenGL headers on Windows. My guess about using DirectX is probably the compatibility. For OpenGL to work nicely you need to use latest video drivers, which inexperienced users will rarely have. For instance, my partner's relatives have Eee PC which has stock drivers in Windows XP and OpenGL applications run in software mode, while Direct3D has no problems (though it is still buggy somewhat).

    Quote Originally Posted by AthenaOfDelphi View Post
    If I'm really honest, I'm actually finding this whole cross platform thing to be a quite disappointing. Lots of definitions have moved, things that are useful like 'Anchors' aren't there in FireMonkey, and so far my experience with the help is that it's sadly lacking.
    As I've said before, FireMonkey is no match for VCL or even LCL, and it seems to be in infant stages. However, it does have benefits, especially if they use it to its full potential.

    Quote Originally Posted by Sascha Willems View Post
    And as for FireMonkey and DX : I was wondering the same thing to, but actually Embarcadero didn't really reply to my question on why they used DX instead of OpenGL. But the damage is done, so I'm pretty sure FireMonkey will be forgotten pretty soon. They could've made so much more out of it with using OpenGL and opening up access to the low-level API functions, but well, never try to understand company decissions...
    Sorry, but you are not being objective. Your opinion seems to be biased towards OpenGL, which in no way better than DirectX and you can't do more with it. Both are just APIs to the underlying hardware, nothing more. In fact, on new Windows installation you'll most likely DO LESS with OpenGL, because on Vista/7 you are stuck with OpenGL 1.4 when using Microsoft drivers, while DX10/11 is still readily available.

    I seriously doubt it that FireMonkey will be forgotten any time soon. But I do think you should read the source code first (since documentation for FireMonkey is nonexistent) before making such immature claims.

    You *do* have access to low-level API functions in FireMonkey, both in OpenGL and DirectX. First, you can use their TContext3D, which contains most low-level API functions wrapped. Look for "FMX.Context.DX9.pas" and "FMX.Context.Mac.pas" specifically. Second, you can just hook into Direct3D/OpenGL to use them directly, exactly as Asphyre does it.

  2. #12
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Thanks for the pointers Yuriy, I'll have a look at that file and see where it can get me.
    :: AthenaOfDelphi :: My Blog :: My Software ::

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •