| View previous topic :: View next topic |
| Author |
Message |
tnd0 How do I cheat?
Reputation: 0
Joined: 26 Jul 2012 Posts: 2
|
Posted: Thu Jul 26, 2012 7:43 am Post subject: Delphi DirectX11 |
|
|
Hey'all,
Has anyone here actually done anything with DirectX11 in Delphi? I recently found translated DirectX11 headers, and I could get it to work by translating a C++DX11 Tutorial but I'm encountering some strange behavior.
Here is what I've done so far, executables (32/64bit) and sourcecode. Minor changes are probably required if you dont have Delphi XE2.
http|//cron|ninjapull|de/npAPI/DX11.rar
Now what bugs me is, that the triangle I render is extremely small. The coordinates in the tutorial are all 1 or -1, I cant see anything if I leave them that small so I changed them to 10's and -10's so I could see the triangle. Then I thought 'yea maybe my camera is too far away' but changing my camera position's z-coodinate has NO EFFECT at all, unless I set it to a non-negative value (then I cant see anything at all because the Triangle is rendered at Z=0/Z=0/Z=0). It doesn't matter if my camera is at (0,0,-1) or (0,0,-10000) or (0,0,-0.0000000001).
And thats not all, everything I draw outside -1..1 in the Z-Coordinatespace gets clipped / disappears.
Does anyone have any experiences with this or could possibly point out where I translated the DX11 tutorial wrong? The code is not too messy I hope, and the C++ source which I tried to translate is included (see .\DX11\_doc_d3dx\dx11src04\ folder).
edit: you cant post url's yet - retarded limitation is retarded.
|
|
| Back to top |
|
 |
Obitio Advanced Cheater
Reputation: 0
Joined: 09 Apr 2012 Posts: 68 Location: null
|
Posted: Thu Jul 26, 2012 12:15 pm Post subject: |
|
|
| Hahaha I tried to use DirectX in delphi also but.....well it's hard....I could barely get anything to work...At least if you got something to work your lucky..
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Thu Jul 26, 2012 3:21 pm Post subject: |
|
|
It's actually easier in delphi than in c, as the COM interface is natively supported (addref and release are automated)
Try something you know works in c and then port to delphi. See if you can see where it goes wrong
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
tnd0 How do I cheat?
Reputation: 0
Joined: 26 Jul 2012 Posts: 2
|
Posted: Fri Jul 27, 2012 4:31 am Post subject: |
|
|
Well it compiles and it renders, I can't find any differences between what I translated and what the original c++ source does. If I compile the C++ Projects with MSVC2010 I can move the camera and have no such bugs as not being able to render outside Z:-1~1. So it probably breaks down to a problem in the DirectX11-delphi headers.
But anyway, why use the ugly DirectX API when there's another beautiful and more powerful graphics API available. I'm going back to openGL. FML.
|
|
| Back to top |
|
 |
|