Author Topic: 64-bit DirectX 11 - Part 2 - Text, Sphere  (Read 197 times)

AW

  • Member
  • *****
  • Posts: 1288
  • Let's Make ASM Great Again!
64-bit DirectX 11 - Part 2 - Text, Sphere
« on: June 04, 2018, 04:05:31 AM »
This demo uses Direct2D to write some Unicode text.
If you want to edit the files be aware that dxmain.inc contains UTF8 charaters, so will be better to use an editor that supports it (notepad+, for example), otherwise the chinese chars will become garbled.
Another point in this demo is that it contains a function to draw a sphere. DirectX 11 does not contain that, Directx 9 did.
Now, I have concentrated in one single include file all the DirectX include stuff. I could have subdivided in a few tens of includes as Microsoft did or in any other arbitrary number. I think one is a good number at this moment.
In the previous examples I had copied to the demo folder all the Microsoft DirectX libraries. Since the number was  keeping growing, now I simply set a variable in the build batch file to the hopefully correct path:
@echo off

SET DX11LIB="C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64"

\masm32\bin\ml64 -c -Zp8 dx11_64App3.asm
\masm32\bin\link /ENTRY:WinMain /SUBSYSTEM:WINDOWS /FIXED /LIBPATH:%DX11LIB% /MACHINE:X64 dx11_64App3.obj



Siekmanski

  • Member
  • *****
  • Posts: 1483
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #1 on: June 04, 2018, 04:55:31 AM »
Cool  8)
Creative coders use backward thinking techniques as their strategy.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #2 on: June 04, 2018, 06:12:56 AM »
I have the messagebox declaring that direct3d failed to initialize. Are there some user runtimes libraries that i need to download for this program?
I already have the ones of version 9... :idea:

Thank you very much.  :icon14:
Felipe.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #3 on: June 04, 2018, 06:15:06 AM »
Builds ok, btw.  :icon14:
Felipe.

AW

  • Member
  • *****
  • Posts: 1288
  • Let's Make ASM Great Again!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #4 on: June 04, 2018, 02:09:41 PM »
Hi Felipe,

The application is running in DirectX 11 Debug mode, so you may need the DirectX 11 SDK installed.
You will know the exact error if you launch dbgview.exe and watch the message.

The situation is like this: You need the SDK installed to use the DEBUG flags as I am doing. If you remove the flags it may run but if there is a problem it will be very difficult to know the reason. I.e, you are between a rock and a hard place.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #5 on: June 05, 2018, 04:32:24 AM »
AW as far as i know the Directx 11 sdk is already included in a general sdk or similar for windows 8 and above?  :idea:

Siekmanski any tip on how you were able of running the program successfully in your system?  :idea:

I already have the latest windows sdk installed (which comes with the build tools).  :idea:

Thanks a lot.  :icon14:
Felipe.

AW

  • Member
  • *****
  • Posts: 1288
  • Let's Make ASM Great Again!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #6 on: June 05, 2018, 04:56:29 AM »
Felipe,

As I said, you will be probably be able to see the error message with DbgView.exe from Microsoft if you have all the required SDKs.

However, I believe that it has to do with the the arrangement for using Direct2D with DirectX 11, which requires the flag D3D11_CREATE_DEVICE_BGRA_SUPPORT. I will have to make some tests and see if there is a way around it when a system does not support that flag. If not we can always use bitmap/sprite fonts.

Siekmanski

  • Member
  • *****
  • Posts: 1483
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #7 on: June 05, 2018, 05:32:23 AM »
Siekmanski any tip on how you were able of running the program successfully in your system?  :idea:

First check if your videocard is capable running DirectX 11.
As AW said, install the DirectX 11 SDK.
Creative coders use backward thinking techniques as their strategy.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #8 on: June 05, 2018, 07:34:22 AM »
I have executed all the demos (or programs) of AW here in the game dev subforum, so i guess must the card be capable.  :idea:
Any link where to get the sdk (if this is not already part of the one which comes with the build tools)?  :idea:

Thanks.  :icon14:
Felipe.

Siekmanski

  • Member
  • *****
  • Posts: 1483
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #9 on: June 05, 2018, 07:58:57 AM »
Creative coders use backward thinking techniques as their strategy.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #10 on: June 05, 2018, 08:03:51 AM »
Isn't that the version 9 of the sdk?  :idea:
Felipe.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #11 on: June 05, 2018, 08:06:32 AM »
I have runned dxdiag and it says: DirectX version=Directx 11... :idea:

Odd problem... :(
Felipe.

Siekmanski

  • Member
  • *****
  • Posts: 1483
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #12 on: June 05, 2018, 08:11:28 AM »
Isn't that the version 9 of the sdk?  :idea:

version 9, 10 and 11
Creative coders use backward thinking techniques as their strategy.

felipe

  • Member
  • ****
  • Posts: 819
  • Eagles are just great!
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #13 on: June 05, 2018, 08:16:14 AM »
I'm almost sure that's the version of the sdk i have (the name is also june 10). Maybe this is really a graphic card problem. This demo-program seems (maybe) that requires more capabilities of the card. And i actually have an "internal one" which is an Intel graphics card (i mean it was in the motherboard by default)... :idea:
Felipe.

Siekmanski

  • Member
  • *****
  • Posts: 1483
Re: 64-bit DirectX 11 - Part 2 - Text, Sphere
« Reply #14 on: June 05, 2018, 08:54:45 AM »
One more reason for me to stick with Direct3D9.  :biggrin:
Creative coders use backward thinking techniques as their strategy.