I have a CAD software I created using MFC/OpenGL. Suddenly, last year, starting with Visual Studio 2019 Community version, it started to crash. I finally figured out why…
During the PICK operation, I was using
numberOfHits = glRenderMode (GL_RENDER)
This was working all along. Now it is crashing the program down the stream.
After struggling with this strange crash for a year, finally, I changed it to
numberOfHits = glRenderMode (GL_SELECT)
numberOfHits is correct and no crash… Wow.
According to MS MFC documentation,
GL_RENDER will return “0” which is bad.
I should have used
GL_SELECT all along to get the hit count.
But why was it working for the past 10 years with
I am confused… It appears like
glRenderMode() was altered recently…in MFC OpenGL???