Results 1 to 10 of 12

Thread: DirectX

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    DirectX

    Still working my way around and learning what options there are available (for simple voxel engine for Delphi Berlin 10.1 for Windows). One striking thing seems to be lack of DirectX related posts and resources for Delphi, not only on this forum but everywhere. Why is that? Is it so horrible no one want’s to use it? Or is it so easy to use no headers, engines or tools are needed?

    I'm aware of https://github.com/CMCHTPC/DelphiDX12 but nothing really refer to it.

    How well does FMX perform?
    Last edited by Thyandyr; 19-05-2017 at 11:50 AM.

  2. #2
    If you are interested in making of voxel based engine then you might want to check this thread:
    http://www.pascalgamedevelopment.com...t=voxel+engine

    As for why there aren't so many DirectX based resources for Delphi:
    First reason is the sheer fact that Delphi has pretty high price so not many game developers are using it. Most tend to use FPC/Lazarus instead since it is free.
    Another reason is that more and more game developers in general tend to go OpenGL way due to its cross-platform compatibility while with DirectX you are limited only to Microsoft based platforms.

    As for using FMX for game development:
    Based on my limited experience with older versions of FMX it isn't very suitable for game development due to its poor performance. Maybe in recent version they managed to improve the situation but I doubt it could compete with other graphical engines performance-vise.

  3. #3
    I'm aware of Laggyluks thread, I even have his code for Free/Lazarus. Unfortunately it depends on several external units that have changed since, so it is beyond me to compile it, but I can of course just read it, there seems to be many clever cool things within it.

    My Vox engine doesn't need to be very powerful as it is just a side aspect of the main project, but naturally I want to put my effort into something that can be extended if needs to, so solid foundation is important. My current main-investigation seems to turn up to dglOpenGL+nxpascal

    I might use FMX 2D just for the form and buttons etc. UI, so in the future I woldnt be limited to Windows only. The rendering would be done only to one component on-screen. So far I've only managed to render to TPanel on VLC. Furthermore, nxPascal is VCL-only anyway.
    Last edited by Thyandyr; 20-05-2017 at 02:27 PM. Reason: Typo

  4. #4
    If you have any question about LaggyLuk's voxel engine don't hesitate to ask in its thread. He is stil visiting PGD forums quite regularly and knowing him from the past I'm sure he will be prepared to help. Perhaps even help you to compile his engine with newest version of FPC/Lazarus (I don't think he is using Delphi).

  5. #5
    Hi Thyandyr,

    I was confronting the same situation a while ago. I don' know if you are interested in D3D11 or D3D12.

    For D3D11 you can check these few examples here - https://github.com/AntonAngeloff/DX11_Examples . I wrote them as part of a project for a basic tutorial on using Direct3D 11 with FPC/Delphi, which unfortunately I never finished. The examples are based on the CMCHTPC headers.

  6. #6
    Quote Originally Posted by Anton View Post
    Hi Thyandyr,

    I was confronting the same situation a while ago. I don' know if you are interested in D3D11 or D3D12.

    For D3D11 you can check these few examples here - https://github.com/AntonAngeloff/DX11_Examples . I wrote them as part of a project for a basic tutorial on using Direct3D 11 with FPC/Delphi, which unfortunately I never finished. The examples are based on the CMCHTPC headers.
    Thanks. I started with OpenGL but will definitely check these as well. I don't have any ideology, I just want something that is easy to set up.

    Had a look. Looks pretty much same as OpenGL code. Unfortunately I get [dcc32 Error] renderer.pas(17: E2010 Incompatible types: 'PDXGI_SWAP_CHAIN_DESC' and 'TDXGI_SWAP_CHAIN_DESC' and I don't know what to do. Maybe the header file superseded the project files.
    Last edited by Thyandyr; 31-10-2017 at 09:10 PM.

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
  •