Glsl calculation

Hi,

if I use a glsl shader to render a texture, how do I know, when the gpu's calculations are done?



Best,

Andreas

Calling glFinish (Renderer.finish) causes the driver to wait until all GL commands have been executed on the card. Because the call is very slow, it's best to avoid it though. How exactly is the texture rendering being done?

If you call glReadPixels after rendering, it will get executed in order after all GL commands are complete. So if you render FBO, then call glReadPixels, you should be fine without glFinish.

Hi,

I render Mandelbrot fractals using a multipass technique with TextureRenderer. If you have p. ex. 30000 iterations, 256 iterations are calculated per step. There, you have 2 rbga32f textures. The first one, you use to save z and the current iteration and the second one displays the actual progress. If you have a small iteration size around 10000-20000, all is working fine. But, if you have 30000 iterations within a gpu intensive area, my screen becomes black and after vpu recovering, my graphic card is in bios mode or the font is distorted. If the font is distorted and I restart my program, the image is distorted, too. After rebooting, I can reuse opengl.

Using renderer.finish in simpleUpdate after calling TextureRenderer.render did not help.



Do you know a solution for my problem? I have a Sapphire Radeon HD 2600 XT.



Best,

Andreas

Try adding some limits or Thread.sleep calls in between iterations. Judging by the results I think the issue is overheating, which could end up with your video card getting totally fried in the end.

Hi,

through debugging, I found there was something wrong with my initialization. With renderer.finish, the program is working now as wished.



Thx,

Andreas