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
a1de9e9a
Commit
a1de9e9a
authored
Feb 14, 2014
by
Roman Donchenko
Committed by
OpenCV Buildbot
Feb 14, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2329 from ilya-lavrenov:macosx_ogl
parents
ecbe8430
b92a46c1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
+20
-15
CMakeLists.txt
CMakeLists.txt
+1
-1
gl_core_3_1.cpp
modules/core/src/gl_core_3_1.cpp
+18
-13
CMakeLists.txt
samples/cpp/Qt_sample/CMakeLists.txt
+1
-1
qt_opengl.cpp
samples/cpp/Qt_sample/qt_opengl.cpp
+0
-0
No files found.
CMakeLists.txt
View file @
a1de9e9a
...
...
@@ -142,7 +142,7 @@ OCV_OPTION(WITH_IPP "Include Intel IPP support" OFF
OCV_OPTION
(
WITH_JASPER
"Include JPEG2K support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JPEG
"Include JPEG support"
ON
)
OCV_OPTION
(
WITH_OPENEXR
"Include ILM support via OpenEXR"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_OPENGL
"Include OpenGL support"
OFF
IF
(
NOT ANDROID
AND NOT APPLE
)
)
OCV_OPTION
(
WITH_OPENGL
"Include OpenGL support"
OFF
IF
(
NOT ANDROID
)
)
OCV_OPTION
(
WITH_OPENNI
"Include OpenNI support"
OFF
IF
(
NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_PNG
"Include PNG support"
ON
)
OCV_OPTION
(
WITH_PVAPI
"Include Prosilica GigE support"
ON
IF
(
NOT ANDROID AND NOT IOS
)
)
...
...
modules/core/src/gl_core_3_1.cpp
View file @
a1de9e9a
...
...
@@ -47,22 +47,27 @@
#include "gl_core_3_1.hpp"
#ifdef HAVE_OPENGL
#if defined(__APPLE__)
#include <mach-o/dyld.h>
#ifdef __APPLE__
#include <dlfcn.h>
static
void
*
AppleGLGetProcAddress
(
const
char
*
name
)
{
static
const
struct
mach_header
*
image
=
0
;
if
(
!
image
)
image
=
NSAddImage
(
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
,
NSADDIMAGE_OPTION_RETURN_ON_ERROR
);
// prepend a '_' for the Unix C symbol mangling convention
std
::
string
symbolName
=
"_"
;
symbolName
+=
std
::
string
(
name
);
NSSymbol
symbol
=
image
?
NSLookupSymbolInImage
(
image
,
&
symbolName
[
0
],
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
|
NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
)
:
0
;
return
symbol
?
NSAddressOfSymbol
(
symbol
)
:
0
;
static
bool
initialized
=
false
;
static
void
*
handle
=
NULL
;
if
(
!
handle
)
{
if
(
!
initialized
)
{
initialized
=
true
;
const
char
*
const
path
=
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
;
handle
=
dlopen
(
path
,
RTLD_LAZY
|
RTLD_GLOBAL
);
}
if
(
!
handle
)
return
NULL
;
}
return
dlsym
(
handle
,
name
);
}
#endif // __APPLE__
...
...
samples/cpp/Qt_sample/CMakeLists.txt
View file @
a1de9e9a
...
...
@@ -7,6 +7,6 @@ FIND_PACKAGE( OpenCV REQUIRED )
find_package
(
OpenGL REQUIRED
)
ADD_EXECUTABLE
(
OpenGL_Qt_Binding
main
.cpp
)
ADD_EXECUTABLE
(
OpenGL_Qt_Binding
qt_opengl
.cpp
)
TARGET_LINK_LIBRARIES
(
OpenGL_Qt_Binding
${
OpenCV_LIBS
}
${
OPENGL_LIBRARIES
}
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/cube4.avi
${
CMAKE_CURRENT_BINARY_DIR
}
/cube4.avi COPYONLY
)
samples/cpp/Qt_sample/
main
.cpp
→
samples/cpp/Qt_sample/
qt_opengl
.cpp
View file @
a1de9e9a
This diff is collapsed.
Click to expand it.
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