Results 1 to 5 of 5

Thread: texture coordinates?

  1. #1
    Guest

    texture coordinates?

    How can you make a texture move from left to right? I can only move texture from top to bottom, or bottom to up.

    I use 4 glTexCoord2f() calls, but I can't seem to get it to move texture from right to left!

    Anyone explain why please?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Italy
    Posts
    124

    Re: texture coordinates?

    You can use glTranslate with the texture matrix mode, without changing glTexCoord.
    tFz

  3. #3
    Guest

    Re: texture coordinates?

    I don't understand what you mean. How can you move just the texture (not the object) by using glTranslate?
    How do I get access to texture matrix??

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

    Re: texture coordinates?

    This should do it.
    Code :
    glMatrixMode(GL_TEXTURE);
    glPushMatrix();
    glTranslatef(x, y, z);
    DrawObjects();
    glPopMatrix();
    glMatrixMode(GL_MODELVIEW);

  5. #5
    Guest

    Re: texture coordinates?

    thanks! I will try now. Is there any performance loss with this ??

Similar Threads

  1. Texture Coordinates and Depth Buffer to obtain world coordinates
    By snkhan42 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-27-2018, 11:52 AM
  2. Texture coordinates to screen pixel coordinates
    By lucafr in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-13-2011, 04:19 AM
  3. Texture Mapping & Texture Coordinates
    By senem in forum OpenGL: Basic Coding
    Replies: 20
    Last Post: 10-03-2007, 08:50 AM
  4. How to get texture coordinates from screen coordinates
    By geckosenator in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 01-28-2006, 07:23 AM
  5. 3D Models with Texture Coordinates and Texture images
    By dimensionX in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-15-2004, 11:59 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