News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

64-bit DirectX 11 - Part 2 - Text, Sphere

Started by aw27, June 04, 2018, 04:05:31 AM

Previous topic - Next topic

aw27

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

Creative coders use backward thinking techniques as a strategy.

felipe

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


aw27

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

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:

aw27

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

Quote from: felipe on June 05, 2018, 04:32:24 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 a strategy.

felipe

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:

Siekmanski

DirectX Software Development Kit
https://www.microsoft.com/en-us/download/details.aspx?id=6812
Creative coders use backward thinking techniques as a strategy.

felipe

Isn't that the version 9 of the sdk?  :idea:

felipe

I have runned dxdiag and it says: DirectX version=Directx 11... :idea:

Odd problem... :(

Siekmanski

Creative coders use backward thinking techniques as a strategy.

felipe

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:

Siekmanski

One more reason for me to stick with Direct3D9.  :biggrin:
Creative coders use backward thinking techniques as a strategy.