What is the best way to implement a refractive surface in OpenGL? I would like to specify that a particular polygon functions like a lens, having translucency and refracting light passing through it.
I am aware that translucency alone may be achieved through alpha-blending.
You need ray-tracing to properly implement refraction.
You can use OpenGL to render the results of the ray-trace, and there are several GPGPU ray-tracers floating around, but those would use OpenCL or CUDA — there’s nothing in the OpenGL API that helps with implementing ray-tracing or refraction specifically.