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

Thread: fixed size texture mapping

  1. #1
    Intern Newbie
    Join Date
    Nov 2002
    Location
    bucharest, romania
    Posts
    35

    fixed size texture mapping

    Hi!
    I have a 320X240 full screen and a bitmap of 16X16 size.I want to texture map the bitmap on a quad so that it fills exactly 16X16 pixels but I don't know how to make a 16x16 quad.I know to make vertex only vith vertex{2,3}{v}{sidf}.Is there a way to work around?
    Thanks to the people who have helped me!

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Atlanta
    Posts
    20

    Re: fixed size texture mapping

    You can switch to orthographic viewing, then use glVertex2i() to draw your quads.


    Anitox

  3. #3
    Intern Newbie
    Join Date
    Nov 2002
    Location
    bucharest, romania
    Posts
    35

    Re: fixed size texture mapping

    Can you be more concrete please?I need an example.

  4. #4
    Intern Newbie
    Join Date
    Nov 2002
    Location
    bucharest, romania
    Posts
    35

    Re: fixed size texture mapping

    Can you be more concrete please?I need an example.

  5. #5
    Intern Contributor
    Join Date
    Nov 2002
    Location
    Germany
    Posts
    50

    Re: fixed size texture mapping

    An OpenGL application should _never_ try to refer to certain pixels on the screen and there isn't really a way to do so. You can, as Anitox said, use orthographic projection, but OpenGL is entirely resolution-independent. Have a look at glDrawPixels() and glBitmap(), maybe they solve your problem.

    [This message has been edited by mm_freak (edited 11-10-2002).]
    Knowledge is Power

Posting Permissions

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