本文介绍了挤出DX9的性能下降的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我用C ++和DX9c编写了几年的代码。但是,我必须承认我过去6个月一直在使用Game Maker:Studio。



我现在又回来在DX9c中再次编写我自己的框架了遇到一些在GM中无法解决的问题:S。



关注点是我为什么我的框架慢于GM:S。



我在我的框架和GM:S中创建了一个比较项目,结果如下。第一列是正在渲染的对象数,其余是FPS。



Hi guys,

I have been coding with C++ and DX9c for a few years now. But, I must admit I have been using Game Maker: Studio for the past 6 months.

I am now back to writing my own framework in DX9c again as I have hit a few issues that just can't be gotten around in GM:S.

The point of concern is that I am bewlidered as to why my framework is slower than GM:S.

I have created a comparision project in both my framework vs GM:S and here are the results. First column is the number of objects being rendered and the rest is the FPS.

Rendered Sprites (256x256)	ID3DXSPRITE	Quad		GM:S 1.3

0				1740		1740		~1400	
1 				1570		1740		~1350
10				706		1209		~1350
100				106		297		~1100
500				25		68		~620
1000				13		35		~450





我已经将我的渲染循环剥离到骨骼,所以它所做的就是这个;





I have stripped my render loop to the bone, so all it is doing is this;

for(int i=0;i<1000;i++)
    mRenderer->getDevice()->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2);





GM:S在负载下的速度仍然快10倍以上。 GM:S也使用DirectX 9c。



打字时只是想了想。我正在使用Summer 2004 DX SDK,其中GM:S使用2010年6月。这可能会带来如此显着的性能提升吗?



先谢谢了,伙计们:)



How is it possible that GM:S is still over 10 times faster under load. GM:S also uses DirectX 9c.

Just had a thought while typing this. I am using Summer 2004 DX SDK where GM:S uses June 2010. Could that make such a significant performace increase?

Thanks in advance, guys :)

推荐答案


这篇关于挤出DX9的性能下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 18:20