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 3 of 3

Thread: glRasterPos() & glPixelZoom()

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    glRasterPos() & glPixelZoom()

    Hi All,

    We are drawing the same 32x32 bitmap (rounded corner) at each viewport corner inverting it with glPixelZoom().

    If the viewport is 100x100 pixel, is it allowes to do:

    Code :
    glRasterPos(100,100);
    glZoomPixel(-1,-1);
    gl.DrawPixel(...);
    Looks like on some hardwares it works only with:

    Code :
    glRasterPos(99,99);
    glZoomPixel(-1,-1);
    gl.DrawPixel(...);
    Otherwise it flickers...

    Thanks,

    Alberto

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: glRasterPos() & glPixelZoom()

    if the viewport is 100x100, then each coordinate is valid when in [0;99] range, so indeed 100 is invalid.

    Did you read this section "9. Careful Updating that Raster Position" here :
    http://www.opengl.org/resources/feat...es/oglpitfall/

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: glRasterPos() & glPixelZoom()

    I was suspecting it, thanks!

    Alberto

Posting Permissions

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