Solved

(Direct X) What is the difference?

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

705 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

20 Experts available now in Live!

Get 1:1 Help Now