Solved

(Direct X) What is the difference?

Posted on 2001-07-08
5
284 Views
Last Modified: 2013-12-26
I'm right now learning direct x programming, so far I'm doing quite okay but I do have one question, in the book I'm using at the moment, sometimes it would use the blitter to copy from one surface( like the back buffer or a generic surface) to another surface (like the from the generic surface to the back buffer) and sometimes it would manually copy the individual bytes from one surface to another. In order words, I'm asking what are the differences between the blitter and copying the individual bytes from one surface to another manually? Also what are the pros and cons of each methods?

And when should the blitter/(manual method) be used to copy the content of one surface to another?
0
Comment
Question by:TDR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Expert Comment

by:smitty1276
ID: 6262986
I would think that you would only need to copy one byte at a time in special situations...  

For example:
If you wanted to copy an area from a surface in memory to the back buffer, but you wanted to make a certain color transparent, you would do it byte for byte.  You would look at each byte, check to see if it is the transparent color, and if it is, you would simply leave the original byte in the backbuffer.
 
Does that make since?
0
 

Author Comment

by:TDR
ID: 6264744
But I thought you could do that also with the blitter but much easier as you can use color keys? So what's the difference between the blitter and the manual method anyway? (I'm repeating myself)

0
 
LVL 1

Expert Comment

by:columbo666
ID: 6378952
automatic : (perhaps) hw-accelerated
manual : (perhaps) slower, you can customize pixel copying (rotating f.e.)
0
 
LVL 1

Accepted Solution

by:
spilocke earned 80 total points
ID: 6382979
Well, basically both of them does the same thing. The only difference is the blitter, although should be more optimized, does not gives you much options or freedom than the manual method. Well, one example might be that you want to change a group of colors and add it based on a channel color so that the foreground and background blends nicely. ( alpha channel? )
Anyway, since this might not be the 'performance savvy' method, people just use the blt instead.
0
 

Expert Comment

by:ttsenis
ID: 7120615
i think that the main issue is to create your image (the one you want to show at the next frame)at the backbuffer in a rather quick time, before using flip. You see if you have a frame rate of 35 or even 50 you have for each frame(backbuffer) 1/35 sec to fill it. Using Blit you can create the backbuffer very quick. Imagin that you have 3 or even 20 sprites-objects to update (in order t0 make the animation). If you do the previous updating through hardware Blitting you will have a normal animation but if you do through soft blitting you will fail.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question