?
Solved

(Direct X) What is the difference?

Posted on 2001-07-08
5
Medium Priority
?
298 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 240 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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 …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

752 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