Procedure TForm1.GLDirectOpenGLRender(Sender: TObject; var rci: TRenderContextInfo);
Begin
if do_clip then
begin
gl.ClipPlane(GL_CLIP_PLANE0, @clip0);
gl.ClipPlane(GL_CLIP_PLANE1, @clip1);
gl.ClipPlane(GL_CLIP_PLANE2, @clip2);
gl.ClipPlane(GL_CLIP_PLANE3, @clip3);
gl.ClipPlane(GL_CLIP_PLANE4, @clip4);
gl.ClipPlane(GL_CLIP_PLANE5, @clip5);
Hi All,
I used TGLDirectOpenGL to setup clipping planes but I can't switch off clipping ...
Var
clip0 : Array [0..3] Of Double = (-1.0, 0.0, 0.0, 1 / 2.0);
clip1 : Array [0..3] Of Double = (1.0, 0.0, 0.0, 1 / 2.0);
clip2 : Array [0..3] Of Double = (0.0, -1.0, 0.0, 1 / 2.0);
clip3 : Array [0..3] Of Double = (0.0, 1.0, 0.0, 1 / 2.0);
clip4 : Array [0..3] Of Double = (0.0, 0.0, -1.0, 1 / 2.0);
clip5 : Array [0..3] Of Double = (0.0, 0.0, 1.0, 1 / 2.0);
Procedure TForm1.GLDirectOpenGLRender(Sender: TObject; var rci: TRenderContextInfo);
Begin
if do_clip then
begin
gl.ClipPlane(GL_CLIP_PLANE0, @clip0);
gl.ClipPlane(GL_CLIP_PLANE1, @clip1);
gl.ClipPlane(GL_CLIP_PLANE2, @clip2);
gl.ClipPlane(GL_CLIP_PLANE3, @clip3);
gl.ClipPlane(GL_CLIP_PLANE4, @clip4);
gl.ClipPlane(GL_CLIP_PLANE5, @clip5);
End;
Thanks for Help !!