Micropro's picture

Error When Draw Reflection

hiiii

i have error when draw reflection this error dose not exist before change windows after i change windows reflection dose not work

this is my code

            GL.ClearColor(Color.Black);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit | ClearBufferMask.StencilBufferBit);
 
 
 GL.Enable(EnableCap.StencilTest);
            GL.ColorMask(false, false, false, false);
            GL.Disable(EnableCap.DepthTest);
            GL.StencilOp(StencilOp.Keep, StencilOp.Keep, StencilOp.Replace);
            GL.StencilFunc(StencilFunction.Always, 1, 1);
 
  DrawMirror();
            GL.Translate(1, 0, 0);
            GL.Color3(Color.SkyBlue);
 
 
 
  GL.ColorMask(true, true, true, true);
            GL.Enable(EnableCap.DepthTest);
            GL.StencilFunc(StencilFunction.Equal, 1, 1);
            GL.StencilOp(StencilOp.Keep, StencilOp.Keep, StencilOp.Keep);
 
 
   GL.PushMatrix();
            GL.Scale(1, -1, 1);
            GL.Translate(2, 0, 0);
            GL.Color3(Color.Red);
            DrawCube();
            GL.PopMatrix();
 
 
 
 GL.Disable(EnableCap.StencilTest);
 
 
  GL.Color3(Color.SkyBlue);
            GL.Enable(EnableCap.Blend);
            GL.Color4(1, 1, 1, 0.8);
            DrawMirror();
            GL.Disable(EnableCap.Blend);
 
 
 
 
 
            GL.Translate(-1, 0, 0);
            GL.PushMatrix();
            GL.Color3(Color.DarkGray);
            DrawCube();
            GL.PopMatrix();

this code it work before change windows

http://www.opentk.com/files/inline_images/error_0.jpg

in this picture the red cube is visible this is not correct

please any one help me with this error

Inline Images

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Micropro's picture

please any one help me

Micropro's picture

up