Results 1 to 5 of 5

Thread: Texture mapping

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    india
    Posts
    12

    Texture mapping

    Can anyone pull me out from this mess ?

    I want to specify texture coordinates using
    glTexCoord*i ().

    Since it doesn't maps linearly the integer values supplied to the float range [0, 1],
    so I cannot access texture coordinates like
    [0.5, 0.5].

    It only specifies the extreme texture coordinates.

    Is their any way by which I can specify different intermediate texels using the integer version of glTexCoordi ?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: Texture mapping

    glTexCoord2f would be better i think

    JD

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    india
    Posts
    12

    Re: Texture mapping

    I can't use glTexCoord*f.

    I have to use glTexCoord*i or glTexCoordPointer (GL_INT ) version.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Texture mapping

    Just curious, why can't you use glTexCoord*f?

    Anyways, scale the texture matrix so you can access parts of the texture with integer coordinates.

    Code :
    glMatrixMode(GL_TEXTURE);
    glScalef(0.5, 0.5, 1);
    glTexCoord2i(1, 1);
    That glTexCoord2i call will be scaled to (0.5, 0.5).

  5. #5
    Senior Member Regular Contributor
    Join Date
    Aug 2001
    Posts
    145

    Re: Texture mapping

    Maybe he's using an integer only OpenGL version for platforms which can't perform floating point arithmetic?

    kon

Similar Threads

  1. Texture mapping ::: 3D Face Mapping
    By 3render3 in forum OpenGL: General
    Replies: 2
    Last Post: 03-24-2013, 06:49 PM
  2. projective texture mapping and shadow mapping
    By phoenix_gl in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-08-2012, 08:00 PM
  3. Replies: 0
    Last Post: 01-09-2005, 05:53 PM
  4. Replies: 1
    Last Post: 01-09-2005, 05:50 PM
  5. Texture Mapping / Environmental Mapping.
    By imported_Andrew in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-09-2000, 01:20 PM

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