Results 1 to 3 of 3

Thread: glRasterPos problems

  1. #1

    glRasterPos problems

    My Problem is that every time i change the raster position when displaying a bitmap
    it dissappears it only works when
    glRasterPos2f/i(0,0) is as such, or on
    glRasterPos2f() when the change is less than
    .0001 and that does virtually nothing.
    What am i doing wrong?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Fargo, ND

    Re: glRasterPos problems

    A couple of things to check.

    1. If the raster position is set to something not visible, and you try and use it to draw a bitmap, none of the bitmap will show up.

    2. When setting the raster position, it is modified by the current model-view and projection matrices, so if you are doing transforms that will make it go out of your viewing volume, you won't get your bitmap displayed.

    One thing you could do would be something like so...

    // Set matrix mode
    // push current projection matrix on the matrix stack
    // Set an ortho projection based on window size
    glOrtho(0, width, 0, height, 0, 1);

    // Switch back to model-view matrix

    // Store current model-view matrix on the stack

    // Clear the model-view matrix

    // You can specify this in window coordinates now


    // Restore the model-view matrix

    // Switch to projection matrix and restore it

    // Switch back to model-view matrix. This isn't
    // strictly necessary, but I tend to try and
    // keep the model-view matrix as the current
    // matrix to keep things simple.
    Software Engineer and OpenGL enthusiast

  3. #3

    Re: glRasterPos problems

    Works Perfectly Now, Thanks a lot.

Similar Threads

  1. glRasterPos is slower on QT4.8 than QT3.3.6
    By ironexmaiden in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 02-14-2012, 05:16 AM
  2. glRasterPos() woes
    By Tokage in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-08-2003, 05:45 AM
  3. about glRasterPos and wglUseFontOutline
    By leegang in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-29-2003, 08:09 AM
  4. glRasterPos
    By mightyMo in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 08-06-2001, 07:38 AM
  5. glRasterPos problem
    By Kilam Malik in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 11-30-2000, 02:18 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