Hi there,

I am using PyCUDA to render slices out of a 3D texture which are then passed to 
an OpenGL PBO for display on the screen. Everything is going well except that I 
cannot get my texture to use the address modes WRAP or MIRROR correctly, they 
produce exactly the same effect as CLAMP. I am confident that I am making a 
valid function call because when I use the BORDER mode I get the expected 
return value of 0 for all lookups outside the volume, but I can’t get WRAP or 
MIRROR working.

The calls simply look like this:
texture.set_address_mode(0, pycuda.driver.address_mode.WRAP)

I can fake the WRAP behaviour by using "x - floorf(x)” as the coord to lookup, 
but this is not as convenient as it is hardcoded into the kernel, not easily 
modified in the python side, and it doesn’t let me use MIRROR either.

Thanks in advance for any help you can give,

Ben
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to