Results 1 to 10 of 12

Thread: OpenGL - Initialising with XE2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ActivateRenderingContext (and DeactivateRenderingContext) are helper functions from our dglOpenGL-Header to easily create and manage a rendercontext. So I guess you've been using our header back then, which is sadly missing (though I've been in contact with embarcadero to replace their badly outdated header with ours).

    You can always grab the latest version here : http://wiki.delphigl.com/index.php/dglOpenGL.pas/en

    The header works fine with XE2, even with 64 Bit and a lot of people use it to create cross-platform applications (inlcuding me ). It's at least known to work with Win32 (and 64, at least during XE beta), Linux (32 and 64 Bit), Mac OS X and possibly more platforms.

    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...

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Quote Originally Posted by Sascha Willems View Post
    ActivateRenderingContext (and DeactivateRenderingContext) are helper functions from our dglOpenGL-Header to easily create and manage a rendercontext. So I guess you've been using our header back then, which is sadly missing (though I've been in contact with embarcadero to replace their badly outdated header with ours).

    You can always grab the latest version here : http://wiki.delphigl.com/index.php/dglOpenGL.pas/en

    The header works fine with XE2, even with 64 Bit and a lot of people use it to create cross-platform applications (inlcuding me ). It's at least known to work with Win32 (and 64, at least during XE beta), Linux (32 and 64 Bit), Mac OS X and possibly more platforms.

    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...
    Hi Sascha,

    I started out with your headers, because I use them on RS2009 and I find them nice and easy. The problem is, they rely on a number of definitions from the Windows unit, like HGLRC (if I recall correctly) and HDC. I couldn't find the equivalent definitions for building with Mac OSx, so I figured they wouldn't work.

    Do you have some example code you could publish for doing this sort of thing in a nice cross platform compatible way in XE2?
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3
    The headers should do fine with Linux/Mac OS (X). The only thing you can't use are the CreateRenderingContext, ActivateRenderingContext, etc. helper functions, as those only support windows. So if you're able to get a render context for linux / Mac then you can use the dglOpenGL.pas without problems.

    As I don't own XE2, I can't help you there sadly. For my cross-platform stuff I use FPC and the TOpenGLControl from Lazarus, which gives me a valid rendering context for each of the platforms that I can then use our header with.

  4. #4
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Quote Originally Posted by Sascha Willems View Post
    The headers should do fine with Linux/Mac OS (X). The only thing you can't use are the CreateRenderingContext, ActivateRenderingContext, etc. helper functions, as those only support windows. So if you're able to get a render context for linux / Mac then you can use the dglOpenGL.pas without problems.

    As I don't own XE2, I can't help you there sadly. For my cross-platform stuff I use FPC and the TOpenGLControl from Lazarus, which gives me a valid rendering context for each of the platforms that I can then use our header with.
    Thanks Sascha,

    Guess it's time to download Lazarus and see about creating an XE2 version of TOpenGLControl from the source... I suspect that will be a major feat in it's own right given it will need to sit in the somewhat complex structure that is FireMonkey.

    Or of course, I fall back to RS2009 and write a Windows only version and then port it, or alternatively use Lazarus... decisions decisions :-)
    :: AthenaOfDelphi :: My Blog :: My Software ::

  5. #5
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Actually, scratch the idea of porting TOpenGLControl to XE2... it's nasty. Just installed Lazarus and taken a peek at the source code
    :: AthenaOfDelphi :: My Blog :: My Software ::

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
  •