Results 1 to 2 of 2

Thread: glTexSubImage2D

  1. #1
    Junior Member Newbie
    Join Date
    May 2001


    I'm not to familiar w/ this function.
    I was wondering if anyone could give me a hand.
    Im using the TK libs. here is sudo code for what i have so far. i want to take one of
    these textures and cut it up and store it as
    smaller textures.

    TK_RGBImageRec *images[2];
    images[0] = tkRGBImageLoad("BIGMAP.sgi"); glPixelStorei();
    glGenTextures(2, &texture[0]);glBindTexture(GL_TEXTURE_2D, texture[x]);
    Then when i go to bind the texture i just use:
    glBindTexture(GL_TEXTURE_2D, TMap[0]);
    before i start drawing.

    The problem is my computer doens't like to
    do loadimages more than 8 times or so.
    So breaking up lareger images into smaller
    textures would be ideal.

  2. #2
    Member Contributor
    Join Date
    May 2001

    Re: glTexSubImage2D

    Hello there,

    glTexSubImage2d(..) is used to modify
    a given rectangle of texels in the currently
    bound texture.

Similar Threads

  1. Using gl.glTexSubImage2D
    By sonnik in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-14-2009, 11:31 PM
  2. pbuffers, glTexSubImage2D and ATI...
    By Dakeyras in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 02-13-2005, 02:28 PM
  3. glTexSubImage2D
    By kackurot in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-11-2004, 01:43 PM
  4. how to use gltexsubimage2d()?
    By yqs2002 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-20-2002, 10:27 PM
  5. glTexSubImage2D
    By krishna in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-25-2001, 06:06 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