OpenGL Multi-View Question

Started by
1 comment, last by rick_appleton 18 years, 8 months ago
I have question regarding OpenGL. I'm not sure how to ask the question. Please excuse me ignorance. In MS GDI, you can draw to a single bitmap but have multiple windows show the same bitmap. You draw into the bitmap once, but different windows can bit blt the same image. For example, I want to draw an animation of a plane flying in one window and I see the plane from afar. In another window, I see the same image of the plane flying only its zoomed in. To accomplish this with GDI, I would simply draw into a bitmap, do a straight btblt in one window and do a stretch blt in the other window. I save processor time because I actually only do the raw math and drawing once into the bitmap. Can I do something something similar in OpenGL? Obviously, I can draw the image twice in to different view ports. But I want something more efficient. What term should I be searching for?
Advertisement
You're probably looking for the term 'texture' which is the OpenGL container for image data. You can attach this texture to a quad, and draw it using an orthogonal projection in as many different viewports as you wish. If implemented properly, the texture will remain in memory of your graphics card (i.e. assuming you have hardware acceleration on your PC). You can also scale, rotate or move the image anyway you please.

Note that OpenGL is primarily a 3D graphics interface (and also not quite related to MS), so terms as BitBlt do not apply at all.

Tom
Note that not only can you draw it in different viewports, but also in different windows. Although this does require the use of the WGL_SHARE_LISTS extension.

This topic is closed to new replies.

Advertisement