Graf Zahl

05-01-2016, 11:41 AM

I am in the need of backporting some OpenGL 3.x code using GL_CLIP_DISTANCEx to GL 2.x with no shaders, but of course, without the ability to use shaders I have to resort to the old way of defining clip planes.

The only problem is, I cannot find any documentation how I have to calculate the plane equations. No documentation I have seen so far goes any further than the absolute basics.

Basically I have two use cases:

Case 1: An y-coordinate in world coordinates is specified, and clip everything whose y is either greater or less.

Case 2: I have a full plane equation in world coordinates and need to transform this to eye coordinates.

How can I do that?

The only problem is, I cannot find any documentation how I have to calculate the plane equations. No documentation I have seen so far goes any further than the absolute basics.

Basically I have two use cases:

Case 1: An y-coordinate in world coordinates is specified, and clip everything whose y is either greater or less.

Case 2: I have a full plane equation in world coordinates and need to transform this to eye coordinates.

How can I do that?