MCPcopy Create free account
hub / github.com/creatale/node-dv / checkError

Method checkError

deps/opencv/modules/core/src/opengl_interop.cpp:83–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83bool cv::ogl::checkError(const char* file, const int line, const char* func)
84{
85#ifndef HAVE_OPENGL
86 (void) file;
87 (void) line;
88 (void) func;
89 return true;
90#else
91 GLenum err = gl::GetError();
92
93 if (err != gl::NO_ERROR_)
94 {
95 const char* msg;
96
97 switch (err)
98 {
99 case gl::INVALID_ENUM:
100 msg = "An unacceptable value is specified for an enumerated argument";
101 break;
102
103 case gl::INVALID_VALUE:
104 msg = "A numeric argument is out of range";
105 break;
106
107 case gl::INVALID_OPERATION:
108 msg = "The specified operation is not allowed in the current state";
109 break;
110
111 case gl::OUT_OF_MEMORY:
112 msg = "There is not enough memory left to execute the command";
113 break;
114
115 default:
116 msg = "Unknown error";
117 };
118
119 cvError(CV_OpenGlApiCallError, func, msg, file, line);
120
121 return false;
122 }
123
124 return true;
125#endif
126}
127
128#ifdef HAVE_OPENGL
129namespace

Callers

nothing calls this directly

Calls 1

cvErrorFunction · 0.85

Tested by

no test coverage detected