PDA

View Full Version : glPushAttrib(GL_ENABLE_BIT) only works for current texture


hornet
12-06-02, 08:20 PM
Seems to me, that glPushAttrib(GL_ENABLE_BIT) / glPopAttrib() only affects GL_TEXTURE_2D for the current active texture (set with glActiveTexturesARB()).

Shouldn't it set the state of all texture-groups according to the opengl spec?

Running nvidia-3123 on xfree86-4.2.1-3, linux-2.4.20


Regards,
\\hornet

Chalnoth
12-06-02, 08:55 PM
I was running into a similar problem with texture coordinate generation some time ago. For my problem, all I had to do was set up the TexGen planes:

glTexGendv(GL_S, GL_OBJECT_PLANE, planeS);
glTexGendv(GL_T, GL_OBJECT_PLANE, planeT);
glTexGendv(GL_R, GL_OBJECT_PLANE, planeR);

There may be a similar problem in your case, where something that is enabled by default for 2D textures is not enabled by default for 3D textures.

hornet
12-07-02, 10:21 AM
Hmm, might be. I'm using glTexGen too for both sets of texture-coordinates, but I'm only creating uv-coordinates.

I'll try setting up object-planes, and see if it changes anything.


Regards,
\\hornet