Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: Need some help

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2012
    Posts
    18

    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.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,191
    Check out viewports and VIEWING transformations

  3. #3
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74
    Quote Originally Posted by Lee_Jennifer_82 View Post
    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
    Last edited by newbiecow; 12-13-2012 at 04:53 AM.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2012
    Posts
    18
    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.

  5. #5
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74

    Thumbs up

    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

  6. #6
    Junior Member Regular Contributor
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    177
    Quote Originally Posted by Lee_Jennifer_82 View Post
    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.

  7. #7
    Newbie Newbie
    Join Date
    Dec 2012
    Posts
    2
    chuc mong giang sinh vui ve va hanh phuc.
    hay tiep tuc post bai nhe.
    Tran trong.

  8. #8
    Intern Contributor
    Join Date
    Dec 2012
    Posts
    74

    Quote Originally Posted by Carmine View Post
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •