Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version
Go to top

MFC D3D Application: Direct3D Tutorial: Part I

, 9 Dec 2012
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) CompuCom, Inc.
United States United States
Hector J. Rivas has 25+ years of experience managing hardware and software development under many different operating systems, platforms and languages. He has developed microcontroller interfaces and PC games; authored computer based training lessons and delivered fully functional financial and administrative data-intensive applications, as well as image processing and other calculation-intensive applications. Mr. Rivas has also managed Y2K remediation, large scale platform migration and Web site projects, from R&D to actual deployment.
Follow on   LinkedIn

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