1
votes

I'm attempting to translate some C++ DX11 Direct3d height-map code into Delphi. I'm at at a stage where I have almost the entire code translated across without any compile errors or run-time errors however I cannot for the life of me get anything to render on-screen - which I believe may be a vertex/pixel shader issue.

The code I'm translating across is here:

http://www.rastertek.com/tertut02.html

And I'm using the JSB DirectX11 interface libraries from here:

http://www.jsbmedical.co.uk/DirectXForDelphi/

I know that the Direct3D subsystem is working correctly as I am able to alter the color of the background of the render surface however, I just do not get any polygons rendered on the display.

There is quite a lot of code which I'm unable to upload here so for convenience, here's a copy of my source (without any object files/binaries)

https://www.dropbox.com/s/r90jbl6vz9gb3s7/Delphi%20Height%20Map.zip?dl=0

Unfortunately, there doesn't appear to be many Delphi DX11 or D3D examples on the internet so I have nothing to benchmark the code against.

I'd be eternally grateful if anyone could offer any pointers as to what may be the issue. Like I say, the code compiles and runs without any errors but just nothing is rendered.

Thanks in advance, Kevin

1
Unfortunately, this isn't how Stack Overflow works. There's a reason there's a limitation of how much code/content you can place in your question - because it's supposed to be as short as possible to isolate your issue, via an MCVE. Links to off-site resources are off-limits here, as they may be removed in the future, rendering it useless to future readers. Not to mention, we would have to go through an awful lot of work to debug your code for you.Jerry Dodge
You have to do some debugging. One program works, the other does not. Where do they diverge? This is about as easy a debugging task as exists because you have a running example to use as a template.David Heffernan

1 Answers

1
votes

You can look here on how to do basic rendering with D3D11 using Delphi - https://github.com/AntonAngeloff/DX11_Examples

These examples use another headers translations, though.