two question

I have two question for help:

  1. I want to rotate object by moving the mouse. I know that I can use “glRotate” to do that. How can I get the viewpoint?
  2. I use “glEnabled(glBlend)” to get a transparent object, but I don’t know how to get the refraction effect.

Refraction is not supported by OpenGL, which means you have to do it yourself, and that is not an easy task. Refraction almost requires raytracing, and that is not what OpenGL is for. Sorry.

Almost? LOL. Get a Cray supercomputer and maybe… But you can try to capture the LFB behind the glass, make a ‘pinch’ or ‘offset’ or some other linear algebra graphic cool trick, splat it again on the LFB, and then render the transparent object, with a speed penalty very less serious.