render slow

Started by
6 comments, last by thuong 18 years, 6 months ago
hi all i have a model with 22,000 vertices, i render in the my engine, it take many CPU(over 100%) to render, can have a way to down CPU when render? note: i render realtime(24 frames/s) can anybody help me? thanks
Advertisement
Are you using an X file or your own model format? How many calls to DrawPrimitive (or whichever you use) do you make each frame? How many textures do you use, and how large are they? Did you accidentally create a REF device instead of a HAL device? Maybe you could try setting vertex processing to hardware when you create the device. What language are you using?



~BenDilts( void );
thanks BeanDog for repling

my format file is .x file(8 MB)

i use: DrawSubset function to render mesh of each frame

i use 3 texture image(28KB, 20KB , 42KB)

i use HAL device

u use : C++, DirectX Language
The only way to know what the reason is would be to profile it. Only then can you actually fix the problem.
Don't shoot! I'm with the science team.....
Quote:Original post by thuong
...it take many CPU(over 100%) to render...


is this reported by a profiling app, or task manager? D3D apps IIRC essentially 'take over' the computer, so i'd go with OrenGL and profile your app.

Also is the only thing your app is doing is rendering the model?

If you're not yielding ("sleeping") in your main loop, then your app will obviously use as much CPU time as possible. This is true of both OGL or D3D, or any other application that runs in a loop and not driven solely by a message pump, and it's something you want in order to get the most performance out of your app.

You *could* throw in a "Sleep(0)" in the loop to yield some CPU time whenever it can, but it's not something to be worried about.
THANKS

MY ENGINE ONLY RENDER ENGINE NORMAL(LOAD MODEL FROM X FILE AND RENDER)
thanks sordid

This topic is closed to new replies.

Advertisement