Skip to main content
gamedev.net
🔒 Locked

Best blitting

Started by Witchcraven Jan 2, 2002 at 3:38 PM 1 replies 150+ views
Original Post
Witchcraven
Witchcraven
Is it better to blit tiles to the video memory with many different video calls when constructing the frame, or blitting everything to a surface in ram and then send that surface to video memory with 1 call?
--------------------------I present for tribute this haiku:Inane Ravings OfThe Haunting JubilationA Mad Engineer©Copyright 2005 ExtrariusAll Rights Reserved
JoeyBlow2
JoeyBlow2
The first because blitting from system RAM to the graphics card has to go over the PCIbus (or AGP BUS) and it can''t handle all that data. A 640x480x32 bit color is 1228800 bytes of data per frame...

It''s alot easier to upload the textures/graphics to the graphics card once (at the beginning), then send it many "draw this texture here" calls to it. Because those simple commands only take like 80 bytes of memory per call. Yes, the first time you upload textures will be slow, but thats the first second the game is running.

The time it starts to go slower is when you have more than 15360 (polygons / commands) * 80 bytes = the same data as blitting a big picture from RAM over it.

I''m sure if you are tiling, it won''t be 15360 squares on the screen you are blitting, maybe 100-500 or so. =) so it diffiently will be faster using the first.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.