Original Post
I am starting to learn DX and see that the two are the same the former is a typedef but is their any other good reason to use it instead of the IDirect3DDevice9 class?
Quote:
Original post by SiCrane
They aren't the same. LPDIRECT3DDEVICE9 is a IDirect3DDevice9 *.
LPDIRECT3DDEVICE9 == IDirect3Device9 *myD3DDevice;Quote:
Original post by SiCrane
Two reasons: One, you never deal with a variable of type IDirect3DDevice9. You do however deal with IDirect3DDevice9 * and IDirect3DDevice9 ** all the time. Two, in the off chance that future platform changes alters the meaning of a long pointer. In old DOS days a long pointer mean a __far *, not just a *. There's a non-zero chance in the future something analagous might occur and then only the typedef will need to change, with minimal effects to code that uses the typedef.
Quote:
Original post by SiCrane
Of course that link is completely irrelevant to this discussion as it has no mention of what the lp prefix means, nor what a long pointer is nor why it would be typedef'ed.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more