PDA

View Full Version : which parameter can a texture object keep



aQ
05-17-2005, 09:36 PM
I create a texture object(useing glGenTexture and glBindTexture) which will used in lots of place, and I want to know which parameter can the texture object save

Bob
05-17-2005, 09:59 PM
Everything set by glTexParameter is specific to a texture object.

aQ
05-17-2005, 11:28 PM
thanks
and what about glTexEnvi?

Relic
05-18-2005, 01:29 AM
Not an advanced question.
glTexEnv state is per texture unit (glActiveTexture).
Read the specs: http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf

aQ
05-18-2005, 03:33 AM
thanks, Bob and Relic, thanks for your answer to my silly question
I have use OpenGL for a year, but just use some simple function of it, I have read most part of the <OpenGL Pregramming Guid>, but because of my poor computer graphics basic and the poor translation, I havn't a whole perspective of the OpenGL technology.
could you give me some advise on having a whole view of the OpenGL technology?
some resource on the web will be prefered

Relic
05-18-2005, 04:55 AM
You're on the portal to all your OpenGL questions.
Go to the main page and dig through the documentation you find there.
Most are accompanied by code pieces or links to tutorials to learn from.
There are all sorts of sites with implementations of most techniques you'll ever need. Just put "OpenGL" and the feature you look for into Google and you get tons of links.

aQ
06-06-2005, 04:36 AM
Originally posted by Relic:
Not an advanced question.
glTexEnv state is per texture unit (glActiveTexture).
Read the specs: http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf I made a test, and the result is in the Opposite,
I first make a texture object with the
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE);

then bind the texture to a QUADS:
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, m_AmbientDiffuse);
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_BL END);
glBindTexture(GL_TEXTURE_2D,m_pTexture->m_Num);
the result is that the QUADS blend its color with texture image.
I am puzzled!