PDA

View Full Version : glActiveTexture and PBO transfers on Nvidia



James A.
08-21-2010, 03:49 AM
I have come across a strange problem, and was wondering if anyone could shed some light on it.

I have been doing some GPU skinning in GL 3.3 and 2.1. my 3.3 version works without any problems, but i have found some errors that only occur my Nvidia card with the 2.1 version.

I create a 1d texture and use a PBO to fill it with skinning data. That 1d texture is bound to GL_TEXTURE12 and left there for the duration of the program. I also use only one shader, with uniform sampler1D skinning_matrices; set to look at unit 12 via my program.

Every frame I transfer over updated skinning data using a PBO, but where as in 3.3 i don't have to worry what is the currently active texture unit is, i can just bind the 1d texture to whatever happens to be the current one and transfer the data to it via the PBO. In 2.1 on my Nvidia card unless the currently active texture unit is GL_TEXTURE12 the transfer doesn't happen (i have verified this by displaying the 1d texture on the bind pose model).

The same code, without regard for the currently active texture, works with no problems on my ATi card using OpenGl 2.1.

has anyone come across anything similar?

James