- If SkyBoxRequired then
- begin
- // glDepthMask(False);
- // glDepthFunc(GL_NEVER);
- glDisable(GL_DEPTH_TEST);
- glClearDepth(1);
- RenderSkybox;
- glEnable(GL_DEPTH_TEST);
- // glDepthFunc(GL_LESS);
- // SwapBuffers(Engine.OpenGLVars.h_DC);
- // glDepthMask(True);
- end;