The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Matthew on April 25, 2012, 08:21:56 PM

Title: DirectX 11 SDK
Post by: Matthew on April 25, 2012, 08:21:56 PM
This is probably a long shot...   :red

Has anyone converted the DirectX 11 .h files to .inc and could pass them on?
Title: Re: DirectX 11 SDK
Post by: qWord on April 25, 2012, 08:30:21 PM
If DX9 is enough for you, you can use japhet's WinInc (http://www.japheth.de/WinInc.html)
Title: Re: DirectX 11 SDK
Post by: donkey on April 25, 2012, 09:03:29 PM
Just finished with 10 and I'm working on 11 this week, GoAsm only though...
Title: Re: DirectX 11 SDK
Post by: Matthew on April 25, 2012, 09:08:24 PM
Would it take much work, to make them compatible with masm?  Before you answer, consider I have no experience of the difference between GoAsm .inc and masm .inc files  :red
Title: Re: DirectX 11 SDK
Post by: hutch-- on April 26, 2012, 01:52:48 AM
 :bg

Yes.
Title: Re: DirectX 11 SDK
Post by: donkey on April 26, 2012, 02:42:57 AM
Quote from: Matthew on April 25, 2012, 09:08:24 PM
Would it take much work, to make them compatible with masm?  Before you answer, consider I have no experience of the difference between GoAsm .inc and masm .inc files  :red

Only where there are naming conflicts really. GoAsm has better scoping within structures so keywords can be used as structure members besides that DX11 is all COM based and the structures are mostly just COM interfaces so it would be pretty easy to convert them. The only real problem is that my headers use types that are all redefined automatically for Win64, that will have to be addressed but it can mostly be done with search/replace.
Title: Re: DirectX 11 SDK
Post by: Greenhorn__ on April 26, 2012, 02:00:15 PM
This files should work with Japheth's WinInc.
I never tested the files, so maybe you have to edit them ...


Regards
Greenhorn
Title: Re: DirectX 11 SDK
Post by: zemtex on April 26, 2012, 08:45:04 PM
In most cases you don't need all of the stuff in the include file. Depends on what you need to do, if you are going to create a game, a tile based game, you only need to draw textures, and perhaps you need sprites too. That can be achieved relatively quickly. The difficult part is actually initializing direct3d, it takes quite a bit of coding just to get it running, and if you want it running perfectly, you need to spend a good amount of time setting it up well. I recommend that you spend much time practicing setting up direct3d, make a robust initialization library for direct3d, don't skip over this part, it is extremely important to have the basis working well. When you have the basis working, you will be glad you spent time making that part work. The rest is joy and adventure.
Title: Re: DirectX 11 SDK
Post by: shlomok on April 30, 2012, 01:40:04 PM
While we are here, has anyone by any chance used the method described here for capturing screen shoots using Directx from masm?
http://www.codeproject.com/Articles/5051/Various-methods-for-capturing-the-screen


extern IDirect3DDevice9* g_pd3dDevice;
Void CaptureScreen()
{
    IDirect3DSurface9* pSurface;
    g_pd3dDevice->CreateOffscreenPlainSurface(ScreenWidth, ScreenHeight,
        D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &pSurface, NULL);
    g_pd3dDevice->GetFrontBufferData(0, pSurface);
    D3DXSaveSurfaceToFile("Desktop.bmp",D3DXIFF_BMP,pSurface,NULL,NULL);
    pSurface->Release();

}



Thanks,

S.
Title: Re: DirectX 11 SDK
Post by: baltoro on May 02, 2012, 07:28:19 PM
SHLOMOK,   
The approach is correct,...I have used a similar method in Visual Studio (C++), and it works.
I see no reason why it would fail in MASM.
Here is an article from Code Project: Various Methods for Capturing the Screen
(http://www.codeproject.com/Articles/5051/Various-methods-for-capturing-the-screen)
...Looks like you took the code from this article.
Title: Re: DirectX 11 SDK
Post by: shlomok on May 02, 2012, 08:48:05 PM
Quote from: baltoro on May 02, 2012, 07:28:19 PM
Here is an article from Code Project: Various Methods for Capturing the Screen
(http://www.codeproject.com/Articles/5051/Various-methods-for-capturing-the-screen)
...Looks like you took the code from this article.

Hi,
Thanks!
I am contemplating between several options, the easiest is to use exiting masm32 code that was posted on the board and works beautifully but i don't understand half of it.


I did include a link to the original source in my post :) :) :)

S.