render to texture (pBuffer) with fragment shader ?
Hi,
I'm trying to render to a pBuffer using a fragment shader
and I end up having a crash ...
I do the following :
create pBuffer
some openGL calls
copy pBuffer to ram using glReadPixels
that works fine without the fragment shader,
but if i add glUseFragmentProgram(_shader_Fragment_Program);
before my openGL calls, the glReadPixel crashes ...
I reduced my fragment shader to a simple gl_FragColor = vec4(0,1,0,1);
for test purposes ...
I also use rectangle texture via the NV/ARB extension.
anyone has any idea ?
Thanks a lot !
If you are going to use a lot of render to texture, shaders and various buffer objects, then i suggest that you drop the p-buffer and use FBO instead.
It's much more flexible and you don't have to worry about textures and programs being attached to the right context.
It's much more flexible and you don't have to worry about textures and programs being attached to the right context.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement