Jump to content
  • Advertisement
Sign in to follow this  
devdept

OpenGL [D3D] Magnifying part of the display and exporting print-resolution screenshots

This topic is 4057 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, 1) Is it possible with direct X to display a small area of the whole scene like a magnification lens? Suppose you have a 200x200 display screen and you want to display the rect x20, y20, width 50, height 50 to and fill the original 200x200 screen. In opengl is done using gluPickMatrix function. 2) Is it possible with direct X to save a bitmap of the scene with higher resolution than the display screen? I mean you have a scene on screen of 200x200 and want to produce a 2000x2000 image for printing a poster size image. Thanks so much, Alberto EDIT: Chose a better subject line for you. Please refer to the forum FAQ [Edited by - jollyjeffers on June 12, 2007 5:22:04 AM]

Share this post


Link to post
Share on other sites
Advertisement
Firstly, please refer to the forum FAQ's with regards to picking a subject line. All three of your recent threads violate the guidelines here and, to be honest, I get a little tired of going in and editing threads. I'd appreciate it if you could save me the hassle [smile]

Quote:
Original post by devdept
1) Is it possible with direct X to display a small area of the whole scene like a magnification lens? Suppose you have a 200x200 display screen and you want to display the rect x20, y20, width 50, height 50 to and fill the original 200x200 screen. In opengl is done using gluPickMatrix function.
Yes, a simple way would be to use "render to texture." You render your normal sized image to a texture and then render that texture to the screen at a size greater than the original render (or a subset of it).

You can achieve the same by tweaking the viewport and/or projection matrices, but it depends whether you want a geometry-space process or a screen-space process.

Quote:
Original post by devdept
2) Is it possible with direct X to save a bitmap of the scene with higher resolution than the display screen? I mean you have a scene on screen of 200x200 and want to produce a 2000x2000 image for printing a poster size image.
Not using the built in functions. But manipulating bitmaps isn't too hard so you can probably do it yourself.

Bare in mind that a simple up-scale like you describe is not likely to be a good solution. The amount of blurring you'll introduce is going to destroy image quality (most resize filters blur with more than 2-4x zoom).

There are some articles online (seem to remember ShaderX/GPU-Gems/GPG had a print article) on how to achieve this. You can implement tile-based rendering to actually render a super-high-res screenshot.

hth
Jack

Share this post


Link to post
Share on other sites
Ooops... Sorry, I am not a forum user expert. I will check FAQ immediately.

Thanks a lot for your answers!

Share this post


Link to post
Share on other sites
devdept, it's not clear to me if you're after enlarging images as a bitmap, or rendering a more finely detailed version of it. From your mention of gluPickMatrix, I assume the latter.

In this case, for (1) I think your best bet is to find the transformation gluPickMatrix provides, and use that. Sounds like it'd be a scale/translation. For (2), create a render target of size 2000x2000 and render the same scene into it.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!