[OPENGL] GL_TEXTURE_RECTANGLE_ARB, textu

Hello, everyone!

I have a some question about CUDA texture addressing…

When I create the texture with GL_TEXTURE_RECTANGLE_ARB(NOT GL_TEXTURE_2D) and float elements(rgba), how can I access the data of the texture in cuda?

I can try to do by using texture2DRect(sampler_id, vec2(x,y)) in program shader code OpenGL, also I cannot change the addressing mode, but can change the shader code only.

Furthermore, I found the texture functions in the NVIDIA_CUDA_Progarmming Manual, but there is not anything about the texture adressing mode: GL_TEXTURE_RECTANGULE_ARB and float-elements.

You cannot directly read textures created in OpenGL from CUDA.

The equivalent of GL_TEXTURE_RECTANGLE in CUDA is to set the “normalized” parameter of the texture reference to “false”. This lets you access the textures with integer coordinates.

Wow~ I missed the noramlized property…

also. I realized that codes in CUDA cannot directly access the texture created in OpenGL…

Thank you for replying. :haha: