comparison ParticleEngine.cpp @ 2155:0a1438c16c2b

Render decoupling.
author Nomad
date Thu, 09 Jan 2014 17:29:17 +0200
parents 9bd7522cdbbb
children ff8920a40c21
comparison
equal deleted inserted replaced
2154:9bd7522cdbbb 2155:0a1438c16c2b
142 142
143 //if (pRenderer->pRenderD3D) 143 //if (pRenderer->pRenderD3D)
144 { 144 {
145 if (pLines.uNumLines) 145 if (pLines.uNumLines)
146 { 146 {
147 pRenderer->pRenderD3D->pDevice->SetTexture(0, 0); 147 pRenderer->DrawLines(pLines.pLineVertices, pLines.uNumLines);
148 /*pRenderer->pRenderD3D->pDevice->SetTexture(0, 0);
148 pRenderer->pRenderD3D->pDevice->DrawPrimitive( 149 pRenderer->pRenderD3D->pDevice->DrawPrimitive(
149 D3DPT_LINELIST, 150 D3DPT_LINELIST,
150 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, 151 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1,
151 pLines.pLineVertices, 152 pLines.pLineVertices,
152 pLines.uNumLines, 153 pLines.uNumLines,
153 D3DDP_DONOTLIGHT); 154 D3DDP_DONOTLIGHT);*/
154 } 155 }
155 } 156 }
156 } 157 }
157 158
158 //----- (0048AC65) -------------------------------------------------------- 159 //----- (0048AC65) --------------------------------------------------------
647 if (p->uScreenSpaceX >= pBLVRenderParams->uViewportX && 648 if (p->uScreenSpaceX >= pBLVRenderParams->uViewportX &&
648 p->uScreenSpaceX < pBLVRenderParams->uViewportZ && 649 p->uScreenSpaceX < pBLVRenderParams->uViewportZ &&
649 p->uScreenSpaceY >= pBLVRenderParams->uViewportY && 650 p->uScreenSpaceY >= pBLVRenderParams->uViewportY &&
650 p->uScreenSpaceY < pBLVRenderParams->uViewportW) 651 p->uScreenSpaceY < pBLVRenderParams->uViewportW)
651 { 652 {
652 if (!pRenderer->pRenderD3D) 653 /*if (!pRenderer->pRenderD3D)
653 { 654 {
654 __debugbreak(); 655 __debugbreak();
655 /*v11 = 13 * p->_screenspace_scale >> 16; 656 v11 = 13 * p->_screenspace_scale >> 16;
656 if ( v11 > 30 ) 657 if ( v11 > 30 )
657 v11 = 30; 658 v11 = 30;
658 v12 = p->uScreenSpaceY - v11; 659 v12 = p->uScreenSpaceY - v11;
659 v13 = p->uScreenSpaceX - (v11 >> 1); 660 v13 = p->uScreenSpaceX - (v11 >> 1);
660 if ( v13 + v11 < (signed int)pViewport->uViewportTL_X 661 if ( v13 + v11 < (signed int)pViewport->uViewportTL_X
665 ; 666 ;
666 } 667 }
667 else 668 else
668 { 669 {
669 pRenderer->MakeParticleBillboardAndPush_BLV_Software(v13, v12, p->sZValue, p->uLightColor_bgr, v11); 670 pRenderer->MakeParticleBillboardAndPush_BLV_Software(v13, v12, p->sZValue, p->uLightColor_bgr, v11);
670 }*/ 671 }
671 } 672 }
672 //else 673 else*/
673 674
674 if (p->type & ParticleType_Diffuse) 675 if (p->type & ParticleType_Diffuse)
675 { 676 {
676 //v14 = &pParticles[i]; 677 //v14 = &pParticles[i];
677 v15._screenspace_x_scaler_packedfloat = p->_screenspace_scale / 4; 678 v15._screenspace_x_scaler_packedfloat = p->_screenspace_scale / 4;