The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: TNick on June 16, 2006, 02:20:08 PM

Title: DirectX and ASM
Post by: TNick on June 16, 2006, 02:20:08 PM
I need some guideness about the basics of DirectX, how to write ASM code that calls DirectX procedures, ...
I read the code in masm/com/..., but I still don't understand how it works.
One more thing: I don't understand this statement:
mov esi,(IGraphBuilder PTR [edi]).IGraphBuilder_QueryInterface

What's with <<(IGraphBuilder PTR [edi])>>?
Title: Re: DirectX and ASM
Post by: Ossa on June 16, 2006, 02:26:29 PM
The best tutorial for DirectX with ASM is still Chris Hobbs' 6 part tutorial on GameDev.net: here (http://www.gamedev.net/reference/articles/article789.asp)

It is for DirectX 6, but the basics are still the same. For more modern examples, look at Scronty's Site: here (http://www.scrontsoft.com/)

mov esi,(IGraphBuilder PTR [edi]).IGraphBuilder_QueryInterface

The (IGraphBuilder PTR [edi]) informs MASM that edi is pointing to an IGraphBuilder structure, so that it can find the correct offset to get the IGraphBuilder_QueryInterface member.

Ossa
Title: Re: DirectX and ASM
Post by: TNick on June 16, 2006, 02:28:39 PM
Thanks for soon answer! I will start there.
Title: Re: DirectX and ASM
Post by: Ossa on June 16, 2006, 02:34:43 PM
I just realised that since they changed the layout at gamedev.net, they mucked up the linking between all 6 articles. The index to them is here (http://www.gamedev.net/reference/list.asp?categoryid=20#201).

Ossa