D3DVertexBuffer.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: D3DVertexBuffer.h
- #ifndef _D3DVERTEXBUFFER__H
- #define _D3DVERTEXBUFFER__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #pragma warning(disable: 4201)
- #include <d3d.h>
- #pragma warning(default: 4201)
- class CD3DVertexBuffer
- {
- friend class CD3DDevice;
- public:
- CD3DVertexBuffer(void);
- ~CD3DVertexBuffer();
- public:
- bool Create(CD3DDevice* pD3DDevice,
- DWORD dwFVF, DWORD dwNumVertices, bool bWriteOnly/* = false*/);
- public:
- HRESULT Lock(LPVOID* lplpData, LPDWORD lpdwSize,
- DWORD dwFlags = DDLOCK_WAIT);
- HRESULT Unlock(void);
- HRESULT Optimize(void);
- HRESULT ProcessVertices(CD3DVertexBuffer* pSrcBuffer,
- DWORD dwVertexOp, DWORD dwDestIndex,
- DWORD dwCount, DWORD dwSrcIndex);
- HRESULT ProcessVerticesStrided(
- DWORD dwVertexOp, DWORD dwDestIndex,
- DWORD dwCount,
- LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray,
- DWORD dwSrcIndex,
- DWORD dwFlags);
- protected:
- LPDIRECT3DVERTEXBUFFER7 m_lpD3DVertexBuffer;
- CD3DDevice* m_pD3DDevice;
- bool m_bWriteOnly;
- };
- #endif // _D3DVERTEXBUFFER__H