• 大小: 42.09MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-10
  • 语言: 其他
  • 标签: DirectDraw7  

资源简介

DirectDraw7 SDK 下载了就能用

资源截图

代码片段和文件信息

//-----------------------------------------------------------------------------
// File: Bend.cpp
//
// Desc: Example code showing how to do a skinning effect using the vertex
//       blending feature of Direct3D. Normally Direct3D transforms each
//       vertex through the world matrix. The vertex blending feature
//       however uses mulitple world matrices and a per-vertex blend factor
//       to transform each vertex.
//
//       Note: This code uses the D3D framework helper library.
//
// Copyright (c) 1997-1999 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#define STRICT
#define D3D_OVERLOADS
#include 
#include “D3DApp.h“
#include “D3DTextr.h“
#include “D3DUtil.h“




//-----------------------------------------------------------------------------
// Defines constants and global variables
//-----------------------------------------------------------------------------
#define PI                  3.14159265358979323846f
#define ELLIPSE_NUMRINGS    20
#define ELLIPSE_NUMSECTIONS 20
#define ELLIPSE_X_LENGTH    1.5f
#define ELLIPSE_Y_LENGTH    1.5f
#define ELLIPSE_Z_LENGTH    4.5f




//-----------------------------------------------------------------------------
// Name: struct D3DBLENDVERTEX
// Desc: Custom vertex which includes a blending factor
//-----------------------------------------------------------------------------
struct D3DBLENDVERTEX
{
    D3DVECTOR v;
    FLOAT     blend;
    D3DVECTOR n;
    FLOAT     tu tv;
};




//-----------------------------------------------------------------------------
// Name: class CMyD3DApplication
// Desc: Application class. The base class provides just about all the
//       functionality we want so we‘re just supplying stubs to interface with
//       the non-C++ functions of the app.
//-----------------------------------------------------------------------------
class CMyD3DApplication : public CD3DApplication
{

    LPDIRECT3DVERTEXBUFFER7 m_pvbRenderVerticesVB;

    D3DBLENDVERTEX*         m_pRenderVertices;
    DWORD                   m_dwNumVertices;
    
    WORD*                   m_pRenderIndices;
    DWORD                   m_dwNumIndices;

    VOID    SetBlendFactor( DWORD dwCount D3DBLENDVERTEX* pIn );
    VOID    RotateVertexInX( FLOAT DWORD D3DBLENDVERTEX* D3DBLENDVERTEX* );
    BOOL    GenerateEllipse( DWORD DWORD FLOAT FLOAT FLOAT
                             D3DBLENDVERTEX** DWORD* WORD** DWORD* );
    HRESULT CreateSceneVertexBuffers();
    static HRESULT ConfirmDevice( DDCAPS* pddDriverCaps
                                  D3DDEVICEDESC7* pd3dDeviceDesc );

protected:
    HRESULT OneTimeSceneInit();
    HRESULT InitDeviceobjects();
    HRESULT DeleteDeviceobjects();
    HRESULT RestoreSurfaces();
    HRESULT Render();
    HRESULT frameMove( FLOAT fTimeKey );
    HRESULT FinalCleanup();

p

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2008-12-07 17:12  dx7sdk\bin\
     文件        1306  1999-04-04 23:09  dx7sdk\bin\dxsetenv.bat
     目录           0  2008-12-07 17:12  dx7sdk\bin\DXUtils\
     文件       39184  1999-09-08 15:47  dx7sdk\bin\DXUtils\ddcaps.exe
     文件      140560  1999-09-08 15:47  dx7sdk\bin\DXUtils\ddtest.exe
     文件       63760  1999-09-08 16:07  dx7sdk\bin\DXUtils\diquick.exe
     文件       87824  1999-09-08 15:47  dx7sdk\bin\DXUtils\DXCapsViewer.exe
     文件       30383  1999-08-05 07:43  dx7sdk\bin\DXUtils\dxdiag.chm
     文件     1558288  1999-09-08 16:08  dx7sdk\bin\DXUtils\dxdiag.exe
     文件      277264  1999-09-08 15:47  dx7sdk\bin\DXUtils\dxtex.exe
     文件        8786  1999-04-14 06:31  dx7sdk\bin\DXUtils\dxtex.txt
     文件       30345  1999-08-05 06:39  dx7sdk\bin\DXUtils\fedit.chm
     文件      168720  1999-09-08 15:51  dx7sdk\bin\DXUtils\fedit.exe
     文件       35088  1999-09-08 15:47  dx7sdk\bin\DXUtils\KillHelp.exe
     目录           0  2008-12-07 17:12  dx7sdk\bin\DXUtils\XFiles\
     文件      103424  1999-03-04 06:18  dx7sdk\bin\DXUtils\XFiles\conv3ds.exe
     文件        5931  1999-03-04 06:18  dx7sdk\bin\DXUtils\XFiles\conv3ds.txt
     文件       22528  1999-03-04 06:18  dx7sdk\bin\DXUtils\XFiles\convx.exe
     文件       56832  1999-03-04 06:18  dx7sdk\bin\DXUtils\XFiles\convxof.exe
     目录           0  2008-12-07 17:12  dx7sdk\doc\
     目录           0  2008-12-07 17:12  dx7sdk\doc\DirectX7\
     文件      361434  1999-09-03 03:20  dx7sdk\doc\DirectX7\directx.chi
     文件     5202338  1999-09-03 03:20  dx7sdk\doc\DirectX7\directx.chm
     目录           0  2008-12-07 17:12  dx7sdk\doc\DirectX7\Word\
     文件     4118016  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\d3dim.doc
     文件     1480192  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\ddraw.doc
     文件      890880  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\dinput.doc
     文件     1278464  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\dmusic.doc
     文件       74752  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\dsetup.doc
     文件      804352  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\dsound.doc
     文件       65024  1999-09-08 15:02  dx7sdk\doc\DirectX7\Word\dxintro.doc
............此处省略2795个文件信息

评论

共有 条评论

相关资源