What are the best parameters for creating device and loading mesh objects to get the best performance?
When I loadmesh into the system mem it almost stops on my 32mb gforce. I create device with HW_VP on and PRESENT INTERVAL IMMEDIATE but still it runs slower than dx samples, although they load meshes in system mem also. What did I miss?
Posted on 2003-11-26 09:15:00 by Vaxon
As much as possible you should load all rendered objects (meshes and textures) into video ram only.

System memory should be used only as a temporary storage until you convert and/or apply movement / deformations to meshes, then use a very fast method to upload this into video ram. Try NOT to do it every frame (upload).

You can occasionaly beat and/or have same speed as video board on 2D operations in system ram
(consider that the CPU is 2G while GPU is 500Mhz)
but you can not (yet) beat video board at 3D operations

so keep as much as possible in video ram
Posted on 2003-11-26 14:34:30 by BogdanOntanu
Afternoon, Vaxon.

If you make a lot of state changes ( i.e. renderstate, etc) , you'll get a drop in fps.

Also: make texture changes ( SetTexture ) as little as possible. Texture changes gobble up fps far more than state changes.

You might want to create a variable which has the currently-selected texture pointer in it. Build a proc which checks the currently-selected texture with the one you want. If the pointer is the same, then don't SetTexture. If it's different, update the variable and call SetTexture.

If the proggy is small at the moment, you could attach it to a post and we'll have a look to see what's up.

Posted on 2003-11-26 16:33:39 by Scronty
do not change DC too many times.
If you draw something do not use GetDC FreeDC in each separate operation.
It is better to get Device Context and free after all work in actulal buffer frame is done before switching it as a face ;)

good work:alright:
Posted on 2003-11-27 01:42:08 by HarryTuttle
What planet are you from, Harry?
Posted on 2003-11-27 02:04:03 by Homer
Thanks, guys.
I was wrong. They do load mesh in system mem, but it stays there only for update reasons after device has been reset. They clone mesh into video memory for rendering. I got x3 fps after optimizing meshes. So it looks better now. You would probably beat me, but I write my proggy in C++ (oh god not even C!). The reason why I do so is quite simple: I want to learn C++ a bit more and I don't have DX9.0 library for MASM:( So after learning masm and dx8.1 a little bit i decided to switch to C++ and dx9.0. As for dx versions, the 9th hasn't got much further, but programming in C++ is terrible after that in straight and forward assembly. When writing in C++ a strange feeling keeps burning in my mind, it seems that i constantly do something wrong. Either C++ syntax is really hard or really clumsy. So I may switch back to masm soon. Now you see, I didn't betray you, guys. I just wanted to see what happens out there. ;)
Thanks again. I'll keep as much as possible in video memory and won't set textures frequently.
And Harry, I promise i will never change DC in my proggy;)
Posted on 2003-11-27 03:19:59 by Vaxon

What planet are you from, Harry?

I know it was stupid.

I am a ufok from the Earth

take care Homer2k
Posted on 2003-11-30 10:24:56 by HarryTuttle