This is probably a long shot... :red
Has anyone converted the DirectX 11 .h files to .inc and could pass them on?
If DX9 is enough for you, you can use japhet's WinInc (http://www.japheth.de/WinInc.html)
Just finished with 10 and I'm working on 11 this week, GoAsm only though...
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
:bg
Yes.
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.
This files should work with Japheth's WinInc.
I never tested the files, so maybe you have to edit them ...
Regards
Greenhorn
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.
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.
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.
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.