Click here to Skip to main content
11,707,470 members (76,184 online)
Click here to Skip to main content
Add your own
alternative version

MFC D3D Application: Direct3D Tutorial: Part I

, 9 Dec 2012 CPOL 94.6K 2.7K 114
Yet another Direct3D framework, this time for MFC apps, with a step by step tutorial
//-----------------------------------------------------------------------------
// XD3DUtil.h: XD3D framework utility constants, macros and globals
//-----------------------------------------------------------------------------

#ifndef _XD3DUTIL_H_
#define _XD3DUTIL_H_

#include <tchar.h>
#include <d3d9.h>

// Vertex Proccessing types enum, including the (hardware) pure device variant

enum VPTYPE
{
	SOFT_VP,
	MIXD_VP,
	HARD_VP,
	PURE_VP,
    FORCE_DWORD_VP = 0x7fffffff
};

// bits in a D3D format inspectors

UINT RGBBITS(D3DFORMAT fmt);
UINT ALPHABITS(D3DFORMAT fmt);
UINT DEPTHBITS(D3DFORMAT fmt);
UINT STENCILBITS(D3DFORMAT fmt);


// D3D type to string converters, with optional prefix skipping

TCHAR* VPTYPESTRING(VPTYPE vpt);
TCHAR* DEVICETYPESTRING(D3DDEVTYPE dt, bool bPrefix = true);
TCHAR* MULTISAMPLESTRING(D3DMULTISAMPLE_TYPE mst, bool bPrefix = true);
TCHAR* PRESENTINTERVALSTRING(UINT pi, bool bPrefix = true);

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

hector [.j.] rivas
Software Developer (Senior) Code Authority, Inc.
United States United States
Pride in craftsmanship is my new thing.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150819.1 | Last Updated 9 Dec 2012
Article Copyright 2006 by hector [.j.] rivas
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid