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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 !....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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 !....
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
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 :-)
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