During the test, it was found that some models would cause OpengL to report 1283 error. The code is as follows:
// check for errors
m_glErrorCode=glGetError();
if(m_glErrorCode != GL_NO_ERROR)
{
const GLubyte *estring;
CString mexstr;
// get the error descritption from OGL
estring = gluErrorString(m_glErrorCode);
// prepare and show a message box
mexstr.Format(L"GLEnabledView:\n\tAn OpenGL error occurred: %s\n", estring);
AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION);
}
The value of m_glErrorCode for debugging is 1283 and eString is a stack overflow
After talking to friends and Googling, I came to the following conclusion:
The push and POP classes in OpengL don’t match.
The reason for the problem is that after a push, an opengL function made an error running, and then the return dropped, causing the subsequent POP not to run, reporting the error.
After the problem is solved, I find that the previous code will make a judgment on the return value of some OpengL functions. Let’s learn. This will help you find out quickly what the problem is.
if(!gluUnProject(winx,winy,winz,modelMatrix,projMatrix,viewport,&objx1,&objy1,&objz1))
return FALSE;
If you want to discuss it, please email me.
Read More:
- How to Fix stack overflow error
- Differences between Java stack overflow ror and outofmemoryerror
- gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildPr
- The docker runtime container reported an error: error response from daemon: OCI runtime create failed
- OpenGL learning — problems encountered in compiling OpenGL program for the first time
- Out of memory overflow solution for idea running error
- Oci-22053: overflow error problem
- JNI ERROR global reference table overflow [How to Solve]
- The C language qsort() function reports an error for overflow of – 2147483648 and 2147483648
- [solution] MAC: stack error: ` gyp ‘failed with exit code:1
- OpenGL basic graphics programming – OpenGL and 3D graphics world
- Develop a Boolean equation for overflow detection
- kernel_stack_inpage_error
- Latex row overflow problem overfull / hbox (1.1499pt too wide) in paragraph
- Arithmetical overflow error converting expression to data type datetime
- How to Solve Int Data overflow error
- Solution of insufficient memory space or desktop stack in GX works2
- Arithmetic overflow error converting identity to data type int
- Solve gitbook rangeerror: maximum call stack size exceeded
- Tomcat memory overflow in Eclipse: Java. Lang. outofmemoryerror: permgen space solution: