How to manage video memory
I''m confused as to how i should be allocating memory for my direct draw surfaces. I''m using nearly 4 meg (i''ll cut it down at some point) which won''t always fit into video memory. When this happens i can place everything into system memory, work on it there and copy it over to the primary surface at the end of each game turn.
The problem is this, Blits to the video memory from system memory are terribly slow, so i copy the image data over manually. This gives me a decent fram rate (80 fps max) but i''m worried about older machines not coping with it so i would like to load as much of the data into video memory as i can. So how do i decide what to load into video memory and what to leave in system? Also am i using the best methods for bliting, vid to vid i let DD do it (Blt), system to system i manually copy the data(memcpy) and the same for sys to vid(memcpy)?
I guess the question is kinda vague but like i said i''m confused here. Once i know what i should be doing i can get it done, it''s just finding a goal thats proving difficult.
cheers for any help guys,
zipless
You could implement the different ways to do it,
and test the system`s capabilities after program
start, and then use the functions that fit best
to the system the program is running on.
(You can ask for the hardware`s capabilities with
DirectX, but ask someone else than me how to do it,
I rearely used it, and don`t know how to do at the moment.
But it`s possible, I remember I`ve done something
like that...
Alas, I don''t have access to my "inside directX" book
at the moment, it`s in a different city...)
and test the system`s capabilities after program
start, and then use the functions that fit best
to the system the program is running on.
(You can ask for the hardware`s capabilities with
DirectX, but ask someone else than me how to do it,
I rearely used it, and don`t know how to do at the moment.
But it`s possible, I remember I`ve done something
like that...
Alas, I don''t have access to my "inside directX" book
at the moment, it`s in a different city...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement