Results 1 to 4 of 4

Thread: How to display image far away from the camera view?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    16

    How to display image far away from the camera view?

    Just like to ask if anybody knows how to display an image at a distance away from the camera view. I know image can be displayed via gluOrtho2D but that places the image at z=0. I tried using glOrtho() and glRaster3d(0,height,z) but it doesnt work. Is there any other way to display image?

    Thank you.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: How to display image far away from the camera view?

    How are you putting the image on the screen?

    The best way would be having the image place on a quad as a texture.

    In ortho mode, you could scale the image down as you move it away from the camara on the Z axis. To make it look like it is at a distance.

    Or just draw it in perspective mode and it will be automatically adjusted as you move it back along the Z axis.


    Originally posted by Lanfear:
    Just like to ask if anybody knows how to display an image at a distance away from the camera view. I know image can be displayed via gluOrtho2D but that places the image at z=0. I tried using glOrtho() and glRaster3d(0,height,z) but it doesnt work. Is there any other way to display image?

    Thank you.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    16

    Re: How to display image far away from the camera view?

    > How are you putting the image on the screen?

    I display the image using glDrawPixel, and i want it to be the same size as the window no matter how i change my viewpoint.

    >The best way would be having the image place on a quad as a texture.

    Therez no way to use glDrawPixel(), glOrtho() and glRaster3i(0,height,z) at the same time?

    Thanx for your reply..

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: How to display image far away from the camera view?

    Well you have the command glPixelZoom, but not sure it is what you want.

    What are you trying to do?

    If you want a image to be say for a background with objects in front of it, using a texture quad is still the best answer. You can resize the quad to match the window size, after a window reshape.
    Also in ortho mode you can move it along the Z axis and it will still fill the screen.

    As for your last question, I see no reason that you could not use them at the same time, but I don't think it would give you the effect that you want.


    Originally posted by Lanfear:
    > How are you putting the image on the screen?

    I display the image using glDrawPixel, and i want it to be the same size as the window no matter how i change my viewpoint.

    >The best way would be having the image place on a quad as a texture.

    Therez no way to use glDrawPixel(), glOrtho() and glRaster3i(0,height,z) at the same time?

    Thanx for your reply..
    [This message has been edited by nexusone (edited 03-03-2004).]

    [This message has been edited by nexusone (edited 03-03-2004).]

Similar Threads

  1. Camera view matrix
    By sasmaster in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-18-2012, 12:11 AM
  2. Convert user view to Camera view.
    By HanWu in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-10-2011, 01:56 AM
  3. change camera view in a display list
    By Mirkowhat in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-24-2011, 11:42 AM
  4. Replies: 1
    Last Post: 01-31-2005, 11:01 AM
  5. Replies: 12
    Last Post: 05-15-2003, 02:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean