textures and the attribute stack
Roland Krause <[email protected]>
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Couple of weeks ago I asked a question about textures and displaylists.
Didn't get any answers, so I am trying to ask the question in a bit
different way:
Say I do this:
GLuint it;
glGenTextures(1,&it);
glBindTexture(GL_TEXTURE_2D,it);
/* ... create my texture
...
glTexParamateri(GL_TEXTURE_2D,...
glTexParamateri(GL_TEXTURE_2D,...
glTexParamateri(GL_TEXTURE_2D,...
glTexParamateri(GL_TEXTURE_2D,...
glTexImage2D(GL_TEXTURE_2D,...
...
... */
glBindTexture(GL_TEXTURE_2D,0);
/* now i want to use it */
glPushAttribute(GL_TEXTURE_BIT); /// PUSH
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,it);
glBegin(GL_QUAD);
for (unsigned int i=0 ; i<n ; ++i)
{
glTexCoord2i(r[i],s[i]);
glVertex3i(x[i],y[i],z[i]);
}
glEnd();
glPopAttribute(); /// POP
My question is: Which texture is now "bound", "it" or the default
texture?
I.e. is the currently bound texture pushed on the attribute stack or
not?
Thanks and best regards,
Roland
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: Roland Krause
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).