Solved

(Direct X) What is the difference?

Posted on 2001-07-08
5
267 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now