Solved

(Direct X) What is the difference?

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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