D3DSimpleShape.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: D3DSimpleShape.h
- #ifndef _D3DSIMPLESHAPE__H
- #define _D3DSIMPLESHAPE__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "D3DVertex.h"
- class CD3DDevice;
- class CD3DSimpleShape
- {
- protected:
- CD3DSimpleShape(DWORD dwVertexTypeDesc);
- virtual ~CD3DSimpleShape();
- public:
- HRESULT Render(CD3DDevice* pD3DDevice,
- DWORD dwFlags = 0);
- CD3DUN1Vertex* GetVertices(void)
- {
- return m_pVertices;
- }
- DWORD GetNumVertices(void) const
- {
- return m_dwNumVertices;
- }
- const WORD* GetIndices(void) const
- {
- return m_pwIndices;
- }
- DWORD GetNumIndices(void) const
- {
- return m_dwNumIndices;
- }
- DWORD GetVertexTypeDesc(void) const
- {
- return m_dwVertexTypeDesc;
- }
- protected:
- int AllocBuffer(void);
- protected:
- CD3DUN1Vertex* m_pVertices;
- DWORD m_dwNumVertices;
- WORD* m_pwIndices;
- DWORD m_dwNumIndices;
- DWORD m_dwVertexTypeDesc;
- };
- #endif // _D3DSIMPLESHAPE__H