Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
8393d755
Commit
8393d755
authored
Feb 09, 2018
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed OpenGL-specific compilation warning (unused function)
parent
7474ad81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
42 deletions
+31
-42
opengl.cpp
modules/core/src/opengl.cpp
+31
-42
No files found.
modules/core/src/opengl.cpp
View file @
8393d755
...
...
@@ -56,53 +56,42 @@ using namespace cv::cuda;
namespace
{
#ifndef HAVE_OPENGL
inline
void
throw_no_ogl
()
{
CV_Error
(
cv
::
Error
::
OpenGlNotSupported
,
"The library is compiled without OpenGL support"
);
}
#else
inline
void
throw_no_ogl
()
{
CV_Error
(
cv
::
Error
::
OpenGlApiCallError
,
"OpenGL context doesn't exist"
);
}
bool
checkError
(
const
char
*
file
,
const
int
line
,
const
char
*
func
=
0
)
#ifndef HAVE_OPENGL
inline
static
void
throw_no_ogl
()
{
CV_Error
(
cv
::
Error
::
OpenGlNotSupported
,
"The library is compiled without OpenGL support"
);
}
#elif defined _DEBUG
inline
static
bool
checkError
(
const
char
*
file
,
const
int
line
,
const
char
*
func
=
0
)
{
GLenum
err
=
gl
::
GetError
();
if
(
err
!=
gl
::
NO_ERROR_
)
{
GLenum
err
=
gl
::
GetError
();
if
(
err
!=
gl
::
NO_ERROR_
)
const
char
*
msg
;
switch
(
err
)
{
const
char
*
msg
;
switch
(
err
)
{
case
gl
:
:
INVALID_ENUM
:
msg
=
"An unacceptable value is specified for an enumerated argument"
;
break
;
case
gl
:
:
INVALID_VALUE
:
msg
=
"A numeric argument is out of range"
;
break
;
case
gl
:
:
INVALID_OPERATION
:
msg
=
"The specified operation is not allowed in the current state"
;
break
;
case
gl
:
:
OUT_OF_MEMORY
:
msg
=
"There is not enough memory left to execute the command"
;
break
;
default
:
msg
=
"Unknown error"
;
};
cvError
(
CV_OpenGlApiCallError
,
func
,
msg
,
file
,
line
);
return
false
;
}
return
true
;
case
gl
:
:
INVALID_ENUM
:
msg
=
"An unacceptable value is specified for an enumerated argument"
;
break
;
case
gl
:
:
INVALID_VALUE
:
msg
=
"A numeric argument is out of range"
;
break
;
case
gl
:
:
INVALID_OPERATION
:
msg
=
"The specified operation is not allowed in the current state"
;
break
;
case
gl
:
:
OUT_OF_MEMORY
:
msg
=
"There is not enough memory left to execute the command"
;
break
;
default
:
msg
=
"Unknown error"
;
};
cvError
(
CV_OpenGlApiCallError
,
func
,
msg
,
file
,
line
);
return
false
;
}
#endif
#define CV_CheckGlError() CV_DbgAssert( (checkError(__FILE__, __LINE__, CV_Func)) )
return
true
;
}
#endif // HAVE_OPENGL
}
// namespace
#define CV_CheckGlError() CV_DbgAssert( (checkError(__FILE__, __LINE__, CV_Func)) )
#ifdef HAVE_OPENGL
namespace
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment