Storing Sprites in Memory
Hei there, I''m just going throught the logic of how the frame rendering process will go in my game. I understand that Blitting from System memory to Graphics memory is very, very slow, so If I''m assuming that people playing my game will have let''s say a minimum of a 4Mb Graphics card and my game runs in 16-bit color (IT''ll run in 3 res''s too, depending on your computer speed and resources) Then not all of my graphics will fit in Video ram anyhow, so I''m going to be blitting from system to video ram nomatter how I do it right?
So Should I store ALL the sprite''s in system ram, compose the backbuffer, then blit to primary? What do you think? Any graphics guru''s got some advice for me? I''d love it!!
Thanks,
Ben
Have been discussing that same issue in a few threads here recently. I''m not a graphics guru (yet), but I''ll share what I''ve learned.
Yah. This is the way to do it. Also somewhat necessary if you want do software alpha blending (not requiring a 3d card).
Sysram to Sysram is fast (optimized asm, even faster with MMX)
Video to Video is fast, and can be done at the same time as CPU, but requires Blting-capable hardware and gobs of vram
Sysram to Video is slow, minimize those.
Video to Sysram is really, really slow, never do this.
Some people have recommended that you put your user interface graphics in vram if they fit. Compose the main area of your screen in sysram and Blt it to the backbuffer (either as one Blt/BltFast, or with dirty rectangles). Then video to video Blt the few interface things to the backbuffer. And finally, do a page flip.
[someone needs to write an FAQ]
- n8
nathany.com
quote:Original post by cyberben
So Should I store ALL the sprite''s in system ram, compose the backbuffer, then blit to primary? What do you think? Any graphics guru''s got some advice for me? I''d love it!!
Yah. This is the way to do it. Also somewhat necessary if you want do software alpha blending (not requiring a 3d card).
Sysram to Sysram is fast (optimized asm, even faster with MMX)
Video to Video is fast, and can be done at the same time as CPU, but requires Blting-capable hardware and gobs of vram
Sysram to Video is slow, minimize those.
Video to Sysram is really, really slow, never do this.
Some people have recommended that you put your user interface graphics in vram if they fit. Compose the main area of your screen in sysram and Blt it to the backbuffer (either as one Blt/BltFast, or with dirty rectangles). Then video to video Blt the few interface things to the backbuffer. And finally, do a page flip.
[someone needs to write an FAQ]
- n8
nathany.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement