[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Efficient Dirty-Rect Sprite Updating System

Posted on 1998-06-02
2
Medium Priority
?
308 Views
Last Modified: 2013-12-03
I'm looking for a relatively straightforward method for updating multiple sprites to the screen, using a fullscreen mix buffer. It should take a list of dirty rects, combine them into a minimal region made up of a few rects, draw the sprites with clipping to the mix buffer (that part is easy) then copy it all to the screen. I'm interested in any algorithms to calculate the minimal bounding region as a small number of rects which can be blitted individually. C/C++ code preferred. Any thoughts about keeping the animation flicker free would be useful, too. Thank you!
0
Comment
Question by:ratty
[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
2 Comments
 

Author Comment

by:ratty
ID: 1406372
Edited text of question
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1406373
You need to build a graph, where each vertex of the graph is a dirty rectangle. There is a connection between two vertices if the two rectangles intersect.

Once you have this ground work, it is easy to massage this to your needs.

For example, if you want to minimize on the number of blits, then you want to find clusters of vertices in the graph (i.e. minimize the distance between the verticies).
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 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