Results 1 to 2 of 2

Thread: glActiveTexture and glBindTexture

  1. #1
    Junior Member
    Join Date
    Sep 2007

    glActiveTexture and glBindTexture

    What is the difference?

    Sometimes I have to use glActiveTexture and sometimes glBindTexture.

    Has the graphics card "slots" like GL_TEXTUREx or is the memory totaly dynamic allocatable?

    best regards,

  2. #2
    Senior Member
    Join Date
    May 2006
    glActiveTexture only sets the currently active texture unit (or "texture image unit" in OpenGL ES 2.0).

    Valid values to pass to glActiveTexture are GL_TEXTURE0 to GL_TEXTUREn-1, where n is the implementation dependent number GL_MAX_TEXTURE_UNITS (or GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS for OpenGL ES 2.0).

    glActiveTexture does nothing in itself, it only means that subsequent calls to change texturing state will target this texture unit (until you call glActiveTexture again with another index).

    glBindTexture binds a texture object to a certain target (GL_TEXTURE_2D, GL_TEXTURE_CUBE, etc.) on the currently active texture unit. This means two things:
    - calls to set up texture object state (glTexParameter) and data (glTexImage) affect the texture object bound to the current texture unit.
    - when rendering, this texture unit will use the texture object state (e.g. wrap and filter modes) and image data from the bound texture object.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

Similar Threads

  1. Puzzling question about glBindTexture
    By amark in forum OpenGL ES
    Replies: 2
    Last Post: 06-02-2004, 06:33 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