Archived

This topic is now archived and is closed to further replies.

Anton LaVey

Blitting, wtf?

Recommended Posts

Anton LaVey    122
Every tutorial I have read on this site so far (and it is quite a lot) have said "I won''t discuss blitting here because it is so obvious, bla bla bla." I need to know what it is and whether there is a tutorial on how to blit things to the screen... Please? Thank you in advance... Anton LaVey

Share this post


Link to post
Share on other sites
ZomeonE    122
Blitting is most commonly used to copy a bitmap (or surface in directx) to the screen or backbuffer.

Take a look in the directx sdk help files for some more info.

Share this post


Link to post
Share on other sites
Anton LaVey    122
I haven''t yet got the DirectX SDK because it is massive (75+MB?) and I have a 28.8Kbps modem :(
I would buy it if it didn''t take 3-4 weeks and if I knew Microsoft weren''t getting my hard-earned money :P

Anton LaVey

Share this post


Link to post
Share on other sites
Just6979    122
anton, if you look closely on the SDK pages, you will find that there is an option to download only the docs and libraries, with out the samples. this ways it''s only about 6 megs

-Justin

Share this post


Link to post
Share on other sites
PoesRaven    122
well, the concept behind blitting is copying an image to you video memory for monitor display
i dont guarentee this will work (i just wrote it off the top of my head)
a simple blit could be the following -- and this is about as slow as i can possibly make it:

void Blit(char* image, char* screen, int imgwidth, int imgheight, int scwidth, int x, int y)
{
screen += scwidth*y+x;
for(int i=0;i {
for(int j=0;j screen[j] = imgage[j];
screen += scwidth-imgwidth;
image += imgwidth;
}
}

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Blitting is used with Blt and BltFast. They are just single functions
and the concept is quite simple. Read the DirectX docs when they come
in the mail.

Share this post


Link to post
Share on other sites
Jim Adams    440
Ack... Blitting was a viable term before DirectDraw...

Blitting is simply transfering a section of data, usually pixel information, from one section of memory to another.

Blt and Bltfast are blitters, as well as functions you can make on your own. The reason most people skip them in articles are that they are so common, and everywhere you look, you should find one or another.

Blitters are like a$$holes - everybody has one - blah blah blah....

Jim Adams

Share this post


Link to post
Share on other sites