Need some help

I am a beginner in OpenGL. I want to create two panels in a window. Each will have different view for a particular object. Could any one suggest me the foolowing:

1.How to create two panels in a window;
2. Which function will enable me to view an object from two different directions? I think I need to set two views for camera. Please calrify it.

Thanks.

Check out viewports and VIEWING transformations

Perhaps your question is naive and below the bar of this forum. If you really want to do something with OpenGL, I suggest you read some sections of OpenGL specification or the redbook for a warm-up. Otherwise, if you only want to see the effects without knowing anything about OpenGL, you can specify your demands in detail and send me a private message.

Best Regards,

newbiecow

Thanks for the information. Actually we are trying to display one vase with artistic design outside as well as its inside wall. none of us from science background. I have started reading the red book. Our aim is to visualize the interior as well as outside part of the vase and its intricate complex design. That why in one panel, we want to show the outside art and other panel will show the inside detail. That’s what I want to display. We have the data. We are trying to model it. Any further suggestion will be highly appreciated.

As far as I understand, your request can still be classified as three cases.

  1. Perhaps this is most suitable in your situation. You use different panels to display different perspective of the same scene. Different panels in an application are different elements, they should be created by operating system dependent APIs or development kit on it. So it is not a mere OpenGL-related question. But some GL extension handles this smoothly, such as glut. I suggest you view the example http://frankensteinosaur.us/?m=201104.

  2. If you’d like to display different perspectives in the same screen, you can use mutiple glViewport to set different areas respectively.

  3. If you like the effect of pic-in-pic. Just do the same as 2.

But each method will reduce your rendering speed greatly.

Any correction or further supplementation will be highly appreciated. Any rascally troublemaker will be cruelly punished, too.

Best Regards,

newbiecow

[QUOTE=Lee_Jennifer_82;1245767]Thanks for the information. Actually we are trying to display one vase with artistic design outside as well as its inside wall. none of us from science background. I have started reading the red book. Our aim is to visualize the interior as well as outside part of the vase and its intricate complex design. That why in one panel, we want to show the outside art and other panel will show the inside detail. That’s what I want to display. We have the data. We are trying to model it. Any further suggestion will be highly appreciated.[/QUOTE] Opening two ‘panels’, as you call them is very easy in OpenGL. For example, it could be done using 2 windows, or 1 window divided into two viewports.

However, if you haven’t done much programming and are not familiar with OpenGL, I’d suggest you use modeling or CAD software to solve your problem.

What do you mean by ‘have the data’? What form is it in? Is it already in some modeling format such as .obj or .lwo? If so, you could probably bring it into ‘Blender’ (free). That would be easier than learning OpenGL.

chuc mong giang sinh vui ve va hanh phuc.
hay tiep tuc post bai nhe.
Tran trong.

[QUOTE=Carmine;1246348]Opening two ‘panels’, as you call them is very easy in OpenGL. For example, it could be done using 2 windows, or 1 window divided into two viewports.

However, if you haven’t done much programming and are not familiar with OpenGL, I’d suggest you use modeling or CAD software to solve your problem.

What do you mean by ‘have the data’? What form is it in? Is it already in some modeling format such as .obj or .lwo? If so, you could probably bring it into ‘Blender’ (free). That would be easier than learning OpenGL.[/QUOTE]

Carmine seems to be an expert in both programming and modeling. Take his advice, if CAD software can solve most of your problem, why bother programming. I’m just only a opengl newbie, too. But I’m interested in it. Do some coding by oneself is a good practice, isn’t it?