How much polygons in 3D engine?
When I put a detailled mesh in my Engine, it immidiatly runs slow.
It now runs 14FPS (avarage) with rendering 5340 polygons per frame. Is this normal (for a beginning engine)?
And if it can run faster by removing the high detailled mesh, it always runs at 85FPS (my monitor frame rate)... how can I adjust this, so I''ll see the REAL framerate?
Thnx!
turn of vsync! it should be in your cards controle pannel..
it all depends on your 3d card... and your code...
i think it sounds slow with 14:5340, but i cant know, whitout knowing more about your computer/code...
try to profile it, and find what parts of the engine that are slow... also browse this forum (OpenGL/DirectX) to find ways to du stuff faster....
minimize the times you change textures(sort things by texture)
blending is pretty slow on older cards...
newer render single triangles...
[edited by - uncutno on June 4, 2003 9:51:55 AM]
it all depends on your 3d card... and your code...
i think it sounds slow with 14:5340, but i cant know, whitout knowing more about your computer/code...
try to profile it, and find what parts of the engine that are slow... also browse this forum (OpenGL/DirectX) to find ways to du stuff faster....
minimize the times you change textures(sort things by texture)
blending is pretty slow on older cards...
newer render single triangles...
[edited by - uncutno on June 4, 2003 9:51:55 AM]
There is a flag called PresentationInterval in the present parameters (used when creating device).
You should check what the is the value that you are using (check the SDK for possible values)
You should check what the is the value that you are using (check the SDK for possible values)
Those suggestions do not explain the 14FPS. No, that is not normal. For 5000 polygons on a GeForce4 Ti, you should be getting several hundred frames per second. Probably you are submitting the data horribly inefficiently (like one triangle per vertex buffer). How many vertex buffers are you using, and how many DrawIndexedPrimitive (or DrawPrimitive) calls are you making each frame?
~CGameProgrammer( );
~CGameProgrammer( );
We''re just importing Meshes, without vertex buffers, as far as I know ... Import -> Render We don''t use drawprimitive.
Changing PresentationInterval to "D3DPRESENT_INTERVAL_IMMEDIATE;" helped to get the FPS around 150fps, but without the havy meshes (now 2670 polygons per frame).
So my polygons get doubled... and the FPS goes down 10 times!!
Any suggestions? :D
Changing PresentationInterval to "D3DPRESENT_INTERVAL_IMMEDIATE;" helped to get the FPS around 150fps, but without the havy meshes (now 2670 polygons per frame).
So my polygons get doubled... and the FPS goes down 10 times!!
Any suggestions? :D
If you are using Direct3D, make sure you have Hardware Vertex Processing turned on. You specify that flag when creating the device. If you are transforming your triangles in software processing, that may explain the low speed.
Guimo
Guimo
Direct3D has no "Import" or "Render" commands, which means you''re using something on top of it. What? Is it that DirectX class library thingie MS released?
~CGameProgrammer( );
~CGameProgrammer( );
We just import .x files... let''s see the folowing code, does importing:
We''ve now turned on Hardware Vertex Processing!! And now we can import the high poly files with a framerate of over 180fps!
Problem is, we''ll have to demonstrate it on a laptop, that proberly won''t support Hardware Vertex Processing
Thnx
D3DXLoadMeshFromX(pFilename, D3DXMESH_SYSTEMMEM, m_pD3DDevice, NULL, &pMaterialsBuffer, &m_dwNumMaterials, &pMesh))
We''ve now turned on Hardware Vertex Processing!! And now we can import the high poly files with a framerate of over 180fps!
Problem is, we''ll have to demonstrate it on a laptop, that proberly won''t support Hardware Vertex Processing
Thnx
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement