Get texture size problem

Hello I’m just learning OpenGL and am starting to write some FFGL plugins. I need to get the texture width and height of the incoming texture but I’m only getting a value of 0 returned by the following functions. Any ideas what I’m doing wrong?

thanks
keith

  GLint width = 0;
  GLint height = 0;
  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
  m_extensions.glUniform1iARB(m_resolutionXLocation, width);
  m_extensions.glUniform1iARB(m_resolutionYLocation, height);

Do you have a texture bound when you ask for the sizes - this code doesn’t so that

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.