Jump to content
  • Advertisement
Sign in to follow this  
Tischnoetentoet

DirectDraw

This topic is 4867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I want to add some zooming to my "engine". I am loading some sprites and drawing these on the main (secondary) surface using the DrawFast method. After that, I use the Draw function to get a part of the secondary surface and draw that on the primary surface. The zooming works nice, but now I want to implement that my images get sharper when I zoom in. How should I accomplish this? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:

I am loading some sprites and drawing these on the main (secondary) surface using the DrawFast method. After that, I use the Draw function to get a part of the secondary surface and draw that on the primary surface.

What exactly are you trying to accomplish with this? Maybe I'm just missing the point but it seems like a lot of unecessary work.


Quote:

The zooming works nice, but now I want to implement that my images get sharper when I zoom in.

The only way to do this is to set up your own LOD(level of detail) system. Basically you need several images at successively higher resolution and detail for the sprite. Then you could write a function (or class if you like) that renders the sprite with a 'zoom level' parameter. It automatically scales the Blitters dest RECT to match that zoom level. Further, at certain levels the the function would swith to a higher resolution image.


Unfortuantely that can require a very large number of images and I doubt it would even look that great. But hey, that's for you to decide ;)

Share this post


Link to post
Share on other sites
Thanks for your reply. I was already implementing the system with the different sizes and zoomfactor. However, I thought there would be an easier way around.

Since this is not the most important feature of the engine, I will give the zoom feature a lower priority.

The fact that I am drawing all surfaces on a secondary surface and then flip it to the primary surface is to prevent flickering. Also, the user will not see the building of the secondary surface, but will see the next frame when it flips surfaces.

This is not my own idea, just read it on a tutorial.

Share this post


Link to post
Share on other sites
Ah, I see now. I just misread it. I thought you meant you were arbitrarily drawing images to an offscreen buffer then copying them from there to the backbuffer. But you were just using doublebuffering. Nevermind ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!