Menu

How do I reset a control from the big RED X?

Help
2003-06-25
2003-06-25
  • Nobody/Anonymous

    I am using windows forms and have add an openglcontrol on a control. I am trying to learn this and so I have been playing with a program that selectively lets me apply openGL commands to this window so that I can try and teach myself.  The problem is that when I try something stupid like GL.glEnd() with no GL.glBegin  I get a big red X on the graphics control.  What I have not been able to do is figure out if there is any way of resetting this control within the program. 

    Also is this big red X an openGL generated thing, a windows forms control thing, or a CsGL thing.  Any help or nudges in the correct direction would be helpful...

    Thanks

     
    • Lloyd Dupont

      Lloyd Dupont - 2003-06-25

      nice X, it isn't ?
      there is no way to reset that.
      and this peace of code of mine is quite controversed.
      after calling glDraw() I call OpenGLException.Assert(), and bing....
      hack that, remove it !....

       
    • Nobody/Anonymous

      B-E-A-U-T-I-F-U-L X ..just not what I want :-)
      Hmm....not sure if I am quite up to the task of hacking it yet!

      Thanks for the quick reply...

      Mike in Paradise,NL

       
      • Lloyd Dupont

        Lloyd Dupont - 2003-06-25

        Not too hard.
        open CsGL/OpenGL/OpenGLControl.cs
        look for OnPaint()
        remove the last line.
        double-clic on buildcs.bat.
        that's it !

        good luck :-)

         
    • Nobody/Anonymous

      Great...That did it...I changed that code as follows

      //Comment out original
      //OpenGLException.Assert();
      // test OpenGL engine ...
      uint error = GL.glGetError();
      if(error != GL.GL_NO_ERROR)
      {
      MessageBox.Show("GL Error "+error+" Cleared");
      }

      Thanks again for the quick response..

      Mike in Paradise,NL

       

Log in to post a comment.