sharp_pixel
02-05-2007, 02:06 PM
Hi there
I want to use to PBOs as textures and put them in two separate texture units (TEXUNIT0 and TEXUNIT1) for input to a shader.
I made some tests and it seems that all the units are set to the latest PBO I bound.
I checked the GL_ARB_pixel_buffer_object specification and didn't see anything regarding multitexturing. No luck with google too.
I am using a GeForce 7800GS on Windows XP with 93.50 (intrumented) drivers.
The test code I use looks like this:
glActiveTexture(GL_TEXTURE1);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo2);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glActiveTexture(GL_TEXTURE0);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_BGRA, GL_UNSIGNED_BYTE, NULL);At this point m_pbo1 is bound to both TEXUNIT0 and TEXUNIT1.
I want m_pbo1 bound to TEXUNIT0 and m_pbo2 bound to TEXUNIT1.
Has anyone an idea about my problem ? Thanks.
I want to use to PBOs as textures and put them in two separate texture units (TEXUNIT0 and TEXUNIT1) for input to a shader.
I made some tests and it seems that all the units are set to the latest PBO I bound.
I checked the GL_ARB_pixel_buffer_object specification and didn't see anything regarding multitexturing. No luck with google too.
I am using a GeForce 7800GS on Windows XP with 93.50 (intrumented) drivers.
The test code I use looks like this:
glActiveTexture(GL_TEXTURE1);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo2);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glActiveTexture(GL_TEXTURE0);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_BGRA, GL_UNSIGNED_BYTE, NULL);At this point m_pbo1 is bound to both TEXUNIT0 and TEXUNIT1.
I want m_pbo1 bound to TEXUNIT0 and m_pbo2 bound to TEXUNIT1.
Has anyone an idea about my problem ? Thanks.