my app is really slow
hi!
i''m making a game which consists of a map (isometric of course)
but the rendering is really slow, how can i improve it? (using DX9)
i''m using:
- a class for a tile which receives the texture from another class call GRID in which is stored all the terrain textures
- a class for a mouse pointer (using Direct3D)
- all of my classes ar set as pointers...
is there anything i can do?
TIA!
I''m not familiar with DX9,
and without seeing your code i really cant gage what is wrong.
but im gonna take a stab and say that, your program is slow because your misusing the DX9 API,
for instance,
1. creating the device wrong, using only software mode or somthing
2. using too many or too few verticies in a given vertex buffer.
3. making too many texture (switches?) requiring the hard ware to do alot of unneccisary information transfer work,
again like i said, this is a stab in the dark, i would check some online tutorials (let google be your guide) how to properly setup DX9 for the kind of rendering your going to be doing.
hope that helps=)
Raymond Jacobs,
www.EDIGames.com
www.EtherealDarkness.com
and without seeing your code i really cant gage what is wrong.
but im gonna take a stab and say that, your program is slow because your misusing the DX9 API,
for instance,
1. creating the device wrong, using only software mode or somthing
2. using too many or too few verticies in a given vertex buffer.
3. making too many texture (switches?) requiring the hard ware to do alot of unneccisary information transfer work,
again like i said, this is a stab in the dark, i would check some online tutorials (let google be your guide) how to properly setup DX9 for the kind of rendering your going to be doing.
hope that helps=)
Raymond Jacobs,
www.EDIGames.com
www.EtherealDarkness.com
some points for you to check:
1.check that you are not loading each frame any file (textures/map).
2.check that you are not rendering all map, you should render only the visible parts.
3.IMMEDIATE or DEFAULT?
1.check that you are not loading each frame any file (textures/map).
2.check that you are not rendering all map, you should render only the visible parts.
3.IMMEDIATE or DEFAULT?
1. Profile
2. Profile
3. Profile
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
2. Profile
3. Profile
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
what do you mean with IMMEDIATE or DEFAULT???
i''m not loading the texture the frames every frame, it''s loaded at the constructor, but i''m using a vertex buffer for each cell... how could i use just one VB in all the grid...maybe that''s what''s slowing it down... hehe
since the grid is 20 x 20 cells
i''m not loading the texture the frames every frame, it''s loaded at the constructor, but i''m using a vertex buffer for each cell... how could i use just one VB in all the grid...maybe that''s what''s slowing it down... hehe
since the grid is 20 x 20 cells
IMMEDIATE and DEFAULT are passed to the function that creats the d3d device, check presentation interval.
One of my trial-run programs was running really slowly until I noticed that I was rebuilding every vertex from a master array each cycle = waste of processing time.
You mentioned you had a tile class... this sounds kinda similiar to what I did... if you''re converting each tile into vertex coordinates each cycle you''re gonna get really bogged down really fast.
You mentioned you had a tile class... this sounds kinda similiar to what I did... if you''re converting each tile into vertex coordinates each cycle you''re gonna get really bogged down really fast.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement