Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: DirectX

  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 08:10 PM.

  7. #7
    Most likely the headers are updated and this causes the error. Could you tell me the Delphi version you are using and which particular example gives you that error? I can try to fix it.
    Anyway, if this is the only error you can try to change the variable to a pointer, i.e. add @ operator in front of swapchain_desc.

  8. #8
    Quote Originally Posted by Anton View Post
    Most likely the headers are updated and this causes the error. Could you tell me the Delphi version you are using and which particular example gives you that error? I can try to fix it.
    Anyway, if this is the only error you can try to change the variable to a pointer, i.e. add @ operator in front of swapchain_desc.
    Berlin 10.1

    I'll try that later in the evening

  9. #9
    The same error appears in Lazarus. I fixed that and added DelphiDX12 as a submodule in the repository, which will download the headers along with the examples on one hand. And on the other hand it will bind the examples to a particular DelphiDX12 version.

    It should compile successfully now, thanks for your feedback. On interest, I am able to add more examples.

  10. #10
    All examples compile but when running them they ask for d3dx10d_43.dll which is not on my computer (Windows 10 64-bit)

    Ok I changed target from debug to release. Now it says DX12.D3DX10 cannot be found... but it is in the headers folder. Oh had to set search path for Release. Now it is back to the exe asking for DX12.D3DX10
    Last edited by Thyandyr; 01-11-2017 at 09:58 PM.

Page 1 of 2 12 LastLast

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
  •