Sign in to follow this  
thuong

render slow

Recommended Posts

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

Share this post


Link to post
Share on other sites
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 );

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this