Re: glDrawPixels.

New Message Reply Date view Thread view Subject view Author view

Ran Yakir (rany++at++rtset.co.il)
Mon, 3 Feb 1997 04:57:56 -0800


On Feb 3, 11:34am, ceti wrote:
> Subject: Re: glDrawPixels.
...
> Iris GL.
> When I zoom in or translate the bitmap, the glRasterPos doesn't work if the
> designated point is out of the screen.
>
> So how can I dispay this bitmap if the lower left coordinate is outside the
> screen (too left or too low) ???
> Is there a special trick, an other command to place the first coordinate out
> side the viewport ??

...

glDrawPixels() can get an address which is inside the image, not only the
corner itself. In your case, you can calculate the pixel that should be drawn
to the lower left corner of the viewport, and send its address within the image
to glDrawPixels. You should specify what is the row length of the image, so
that OpenGL can skip to the next row of pixels, to the same x position. You
specify the row length with glPixelStorei (GL_PACK_ROW_LENGTH, row_length).

Ran

-- 
 __                                  | Ran Yakir
 /_)  _  __   \  / _   / o __        | RT-SET Ltd.
/ )_ (_(_) )   \/ (_(_/<_(_)(        | 
              _/                     |   
-------------------------------------+--------------------------------
Phone :                              | E-mail : rany++at++rtset.co.il
  Work : 972-9-9552236               |          rany++at++netvision.net.il
  Res. : 972-9-7489974               |
Fax    : 972-9-9552239               |
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:34 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.