PDA

View Full Version : Need some help



Lee_Jennifer_82
12-12-2012, 05:12 PM
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.

Dark Photon
12-12-2012, 06:03 PM
Check out viewports and VIEWING transformations

newbiecow
12-12-2012, 11:48 PM
I just want to draw two panels in a window which will show two different view of an object. I just started OpenGL, not a programming person. Could any one guide me how to do that? Thanks.

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

Lee_Jennifer_82
12-14-2012, 11:44 AM
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.

newbiecow
12-24-2012, 10:13 PM
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

Carmine
12-26-2012, 11:24 AM
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. 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.

gvtheogioC
12-27-2012, 12:31 AM
chuc mong giang sinh vui ve va hanh phuc.
hay tiep tuc post bai nhe.
Tran trong.

newbiecow
12-27-2012, 05:28 AM
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.


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?