Results 1 to 2 of 2

Thread: glRasterPos2d(), rounding errors when zooming?

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2009

    glRasterPos2d(), rounding errors when zooming?

    Hello everybody,

    I'm beginning learning OpenGL programming and have a problem with placing a bitmap text in the upper left corner of the screen.

    For the placement of the text I use the glRasterPos2d() function to convert screen coordinates (pixels) into object coordinates. The pixel coordinates are always the same, because the text should appear at the same position all the time. The text is displayed via the glutBitmapCharacter() function. This works fine, also when I zoom into the model via a scaling of the model via glScaled(). But when I zoom a couple of times it happens that the text begins to hop to another pixel position on the screen. Is this a problem due to the conversion from object coordinates which are given to glRasterPos2d() back to screen coordinates? I use double precision values for all variables.

    I also tried glWindowPos2dARB() which I found to be useful in this context in some of the postings in this forums. But I have the problem that I get linker errors after compilation. I included glext.h and also defined GL_GLEXT_PROTOTYPES 1 before including glext.h.

    I use OpenGL together with wxWidgets on Windows XP on a Laptop from 2004 with an ATI MOBILITY RADEON 9700 graphics card.

    Thank you very much for your help.

    Cheers, Tim

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2009

    Re: glRasterPos2d(), rounding errors when zooming?


    what is your link error ?

    the function "glWindowPos2dARB" is an extension, so you need to query it at runtime, and you can't statically link against it on windows.


    Pierre B.
    AMD Fellow
    Pierre B.
    AMD Fellow

Similar Threads

  1. Replies: 4
    Last Post: 12-10-2012, 01:17 PM
  2. Rounding floats
    By Siassei in forum OpenCL
    Replies: 1
    Last Post: 05-13-2011, 04:33 PM
  3. Heavy rounding in RGB16 ?
    By Andru in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 06-17-2003, 03:50 PM
  4. Rounding issues with tiles
    By stefan in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-18-2002, 01:26 AM
  5. rounding GLfloat values??
    By piker in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-03-2002, 12:04 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