Results 1 to 5 of 5

Thread: fixed size texture mapping

  1. #1
    Member 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
    Member 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
    Member 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
    Member Newbie
    Join Date
    Nov 2002
    Location
    Germany
    Posts
    48

    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

Similar Threads

  1. Mapping from rednerbuffer size to texture size for glow effect
    By 2Wheels in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-11-2013, 04:16 PM
  2. Replies: 0
    Last Post: 02-19-2004, 05:09 AM
  3. texture mapping - Image size
    By sarahippo in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-14-2003, 12:49 AM
  4. OT: Fixed size texture mapped fonts
    By zen in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-10-2002, 01:56 PM
  5. size of bmp while texture mapping
    By abhiboy007 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-24-2001, 08:46 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