2D acceleration and DD surfaces
Most currently available 2d cards support at least some hardware acceleration that Windows takes advantage of. The most notable for game programmers is of course blitting (which is supported by DirectDraw), but lines, rectangles etc. are important for the general Windows environment.
What I want to know is, if I use the GDI drawing functions, such as Rectangle on DirectDraw surfaces in video memory, do I get the benefits of hardware acceleration? If not, is there any other way to use them?
Well, no. If you use a function like Rectangle, that''s done in software. If you blit from the surface to a primary surface, then there will be acceleration...but that''s not what you''re asking. The only way i can think of to do what you want is to blit a rectangle or a line or whatever. That would mean having an image of a rectangle or line and blitting it to the right size, which would mean stretching and making it look bad... If you''re that worried about speed, perhaps you could calculate all the lines/rectangles/etc. you need beforehand, put them on a surface, and then you can blit them to your desired surface at accelerated speed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement