Refraction using opengl es1.1 - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Refraction using opengl es1.1 (/thread-2342.html)
Refraction using opengl es1.1 - aBabyRabbit - Oct 7, 2008 12:23 AM
I wish to do a basic water effect (doesn't everyone?), and currently I'm rendering to a FBO, then drawing the bound texture to the screen via a mesh with displaced texture coordinates to achieve refraction, and in addition using texture combine to draw an additional texture over the top for the highlights.
This works rather well except that:
1/ when the mesh is too fine then I start to choke the renderer.
2/ the fbo and drawing of it's bound texture seems to be a considerable performance hit.
Currently I get about 25fps with the renderer spending rather large amounts of its time in the glFlush (which I suppose is a good point to be using multithreading to do other things) but.. the main question of my post is: given the capabilities of this (the you-know-what) platform, is there another better way of achieving refraction effects??
Note: without refraction I can easily get 50+ fps.
Refraction using opengl es1.1 - OneSadCookie - Oct 7, 2008 02:16 AM
Why are you calling glFlush? That's *very* seldom required, and always a performance penalty.
Refraction using opengl es1.1 - aBabyRabbit - Oct 7, 2008 02:23 AM
sorry - I ment glFlush as in the flushing shown by instruments within the heart of [context presentRenderbuffer:GL_RENDERBUFFER_OES]