Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Crispy

Drawing offscreen and viewport size

This topic is 5557 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

These are the two questions that have been bugging me for more than an hour now (I guess I''m having one of those blocks...). 1) I need to draw into the frame buffer offscreen to precreate a set of images before I start displaying anything. This is all cool and it works, but only as long as the window is completely visible (otherwise Windows does its statutory clipping) - that means, if the window is partially outside of the desktop or covered by the start bar/some other window - parts of it are not cleared properly. I, on the other hand need full access to the entire updated frame buffer... 2) I have viewport and perspective properly set up. In the perspective view everything is fine, but the ortho view extens from (-1, -1) to (1, 1), instead of (0, 0) to (vp_x, vp_y). I''ve never had this problem before so I guess I''m just forgetting something (since I started a brand new basecode and went through the whole mess of getting every rudimentary detail properly set up again). To be more precise, I''m having trouble working out any kind of correlation between outline font size and viewport size. I''d appreciate a pointer or two where I might be messing up. Cheers

Share this post


Link to post
Share on other sites
Advertisement
Why don't you use pbuffers for offscreen rendering? See http://oss.sgi.com/projects/ogl-sample/registry/ for more information on pbuffer (WGL_ARB_pbuffer extension)!

--------------------------------------------------------

"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"

Corrail
corrail@gmx.at
ICQ#59184081

[edited by - Corrail on September 23, 2003 9:19:43 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Ferdinand the Bull
Re: question 1 - wouldn''t it be better to render into an offscreen DIBSection?


1) You mean, independently from OpenGL?
2) I need the video cards features (blending, etc)...


quote:
Original post by Ferdinand the Corrail
Why don''t you use pbuffers for offscreen rendering? See http://oss.sgi.com/projects/ogl-sample/registry/ for more information on pbuffer (WGL_ARB_pbuffer extension)!



Thanks for the clickerson. I never really knew/took interest in what this extension was for

Alternatvely, I''m thinking of force-switching to fullscreen, which pretty effectively gets rid of this problem...

Share this post


Link to post
Share on other sites
1) No, not independently from GL. Windows' implementation provides the capability of selecting a rendering context into a memory DC. It's slower than blting an image from the screen, and you lose the advantage of hardware acceleration, but it allows you to get a complete image, regardless of whether or not the app window is partially/completely obscured. Also, since the GL implementation used is the basic MS OpenGL 1.1, any advanced features (> 1.1) won't work.

I tend to code for the minimum expected configuration, avoiding the use of extensions and features not supported by the basic software implementation, so the limitations I described don't bother me. (BTW, blending ops are supported in 1.1).

I'm not familiar with the pBuffer extension, but this has piqued my curiousity so I'll probably check it out, now. If pBuffer rendering allows the hardware implementation to be used when rendering off-screen, that would eliminate the restriction imposed by the software implementation - you'd have access to whatever features are supported by the video board. (For my own use, this won't change the way I do things- I'll still program for the lowest common denominator. I don't write games, and am not as concerned w/ using the latest, greatest features as others who hang out here.)

[edited by - Ferdinand the Bull on September 25, 2003 12:04:57 PM]

Share this post


Link to post
Share on other sites

  • 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!