d3d

LPCTSTR str="欢迎来到我的世界"; //d3dClear(D3DCOLOR_XRGB(200,200,24)); //d3dClear(0); //d3dHdc hdc; //SetTextColor(hdc,RGB(255,255,255)); //SetBkMode(hdc,1); //TextOut(hdc,0,0,str,strlen(str)); //hdc.Release (); d3dClear(); //秨﹍酶籹 d3d_Device->BeginScene(); //d3d_Device->SetRenderState( D3DRS_CULLMODE , D3DCULL_NONE); //d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); //d3d_Device->SetRenderState( D3DRS_SHADEMODE , D3DSHADE_FLAT ); //d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE ); //a_Bk.BltFast(0 , 0 ); ////开混色 //d3d_Device->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA); //d3d_Device->SetRenderState( D3DRS_DESTBLEND ,D3DBLEND_INVSRCALPHA); //d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE , D3DZB_TRUE ); ////a_Role.BltFast(0,0,100,100); ////设定色彩与混色操作来源 // d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAARG1 , D3DTA_TEXTURE ); // d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAARG2 , D3DTA_DIFFUSE ); //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLORARG1 , D3DTA_TEXTURE ); //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLORARG2 , D3DTA_DIFFUSE ); ////顶点混色值一律为0.5(128) ////来源Alpha值两都相乖,着色用基台1 //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLOROP , D3DTOP_SELECTARG2); //d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAOP , D3DTOP_MODULATE ); ////来源Alpha值基台1,使用基台2 //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLOROP , D3DTOP_SELECTARG2); //d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAOP , D3DTOP_SELECTARG1 ); //a_Role.BltFast(000,0,200,200,D3DCOLOR_ARGB(128,255,0,0)); // //来源Alpha值基台1,使用基台2 //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLOROP , D3DTOP_SELECTARG2); //d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAOP , D3DTOP_SELECTARG1 ); //a_Role.BltFast(200,0,400,200,D3DCOLOR_ARGB(128,255,0,0)); // //来源Alpha值基台1,使用基台2 //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLOROP , D3DTOP_MODULATE); //d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAOP , D3DTOP_SELECTARG1 ); //a_Role.BltFast(0,200,200,400,D3DCOLOR_ARGB(128,255,0,0)); // //来源Alpha值基台1,使用基台2 //d3d_Device->SetTextureStageState( 0 , D3DTSS_COLOROP , D3DTOP_MODULATE); //d3d_Device->SetTextureStageState( 0 , D3DTSS_ALPHAOP , D3DTOP_MODULATE ); //a_Role.BltFast(200,200,400,400,D3DCOLOR_ARGB(128,255,0,0)); // d3d_Device->SetTextureStageState( 0 , D3DTSS_COLORARG2 , D3DTA_DIFFUSE ); //D3DXMATRIXA16 mat,tran,rot; //d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); //d3d_Device->SetRenderState( D3DRS_SHADEMODE , D3DSHADE_FLAT ); //d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE ); //a_Bk.BltFast(0 , 0 ); //d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_TRUE); //D3DXMatrixIdentity(&mat); //d3d_Device->SetTransform (D3DTS_WORLD,&mat); // //a_Mesh.Draw (); //D3DXMatrixRotationY(&rot,D3DX_PI/180.F*90.0f); //D3DXMatrixTranslation(&tran,1.0f,0.1f,1.0f); //mat=rot*tran; //d3d_Device->SetTransform (D3DTS_WORLD,&mat); //a_Mesh.Draw (); ////D3DVIEWPORT9 vp; //// d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE ); //// //棵辊よ材唉ρ //// vp.X = 0; //// vp.Y = 0; //// vp.Width = 640; //// vp.Height =340; //// vp.MinZ = 0.0f; //// vp.MaxZ = 1.0f; //// d3d_Device->SetViewport( &vp ); //// d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); //// a_Bk.BltFast( 0 , 0 ); //// d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_TRUE ); //// a_Mesh.Draw(); //// //棵辊よ材唉ρ //// vp.X = 0; //// vp.Y = 240; //// vp.Width = 640; //// vp.Height = 240; //// vp.MinZ = 0.0f; //// vp.MaxZ = 1.0f; //// d3d_Device->SetViewport( &vp ); //// d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); //// a_Bk.BltFast( 0 , 0 ); //// D3DXMATRIXA16 mat ; //// D3DXMatrixRotationY( &mat , D3DX_PI ); //// d3d_Device->SetTransform( D3DTS_WORLD , &mat ); //// d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_TRUE ); //// a_Mesh.Draw(); // d3d_Device->SetRenderState( D3DRS_SHADEMODE , D3DSHADE_FLAT ); // d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); // // //棵辊よ材唉ρ // d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); // a_Bk.BltFast( 0 , 0 ); // d3d_Device->SetRenderState( D3DRS_ZENABLE , D3DZB_TRUE ); // //// d3d_Device->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); // a_Mesh.Draw(); // & nbsp;

你可能感兴趣的:(d3d)