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

Thread: centering glDrawPixels inside a list

  1. #1
    Intern Contributor
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    63

    centering glDrawPixels inside a list

    Hi,

    I'm rendering a 3d geometry with some 2d labels, these labels basically are 2d bitmaps located with a 3d point, I'm using glDrawPixels to draw the bitmap of those labels, since I need those bitmaps allways face to the front I can't use textured quads, well, I could.. but I can't be converting that quad every time because I'm using a display list..

    Inside the list creation, I have a call to glDrawPixels, and first I call glRasterPos3d, but I need to have the bitmap displayed by glDrawPixels centered, not in the lower left coords, the only way I see, is converting the 3d point to 2d and move that 2d point the bitmap width/2 and height/2, but the calls of glGet* are not stored inside the list.. with glBitmap I can center the bitmap easily within the glBitmap call, and I would need to convert the 3d point to 2d, the problem if I use glBitmap is it will go monochrome, is there a way to center the glDrawPixels ??.. any ideas ????

    Thanks.

  2. #2
    Intern Contributor
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    63

    Re: centering glDrawPixels inside a list

    sorry I missed something:

    "with glBitmap I can center the bitmap easily within the glBitmap call, and I would NOT need to convert the 3d point to 2d"

Posting Permissions

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