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
5c0f2f8e
Commit
5c0f2f8e
authored
Feb 27, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reused buffer in GlTexture::copyFrom(GpuMat)
parent
212ceb3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
opengl_interop.hpp
modules/core/include/opencv2/core/opengl_interop.hpp
+1
-0
opengl_interop.cpp
modules/core/src/opengl_interop.cpp
+6
-6
No files found.
modules/core/include/opencv2/core/opengl_interop.hpp
View file @
5c0f2f8e
...
...
@@ -157,6 +157,7 @@ namespace cv
int
type_
;
Ptr
<
Impl
>
impl_
;
GlBuffer
buf_
;
};
template
<>
CV_EXPORTS
void
Ptr
<
GlTexture
::
Impl
>::
delete_obj
();
...
...
modules/core/src/opengl_interop.cpp
View file @
5c0f2f8e
...
...
@@ -915,7 +915,7 @@ inline void cv::GlTexture::Impl::unbind() const
#endif // HAVE_OPENGL
cv
::
GlTexture
::
GlTexture
()
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
cv
::
GlTexture
::
GlTexture
()
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
,
buf_
(
GlBuffer
::
TEXTURE_BUFFER
)
{
#ifndef HAVE_OPENGL
throw_nogl
;
...
...
@@ -924,7 +924,7 @@ cv::GlTexture::GlTexture() : rows_(0), cols_(0), type_(0)
#endif
}
cv
::
GlTexture
::
GlTexture
(
int
rows
,
int
cols
,
int
type
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
cv
::
GlTexture
::
GlTexture
(
int
rows
,
int
cols
,
int
type
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
,
buf_
(
GlBuffer
::
TEXTURE_BUFFER
)
{
#ifndef HAVE_OPENGL
(
void
)
rows
;
...
...
@@ -939,7 +939,7 @@ cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), typ
#endif
}
cv
::
GlTexture
::
GlTexture
(
Size
size
,
int
type
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
cv
::
GlTexture
::
GlTexture
(
Size
size
,
int
type
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
,
buf_
(
GlBuffer
::
TEXTURE_BUFFER
)
{
#ifndef HAVE_OPENGL
(
void
)
size
;
...
...
@@ -953,7 +953,7 @@ cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)
#endif
}
cv
::
GlTexture
::
GlTexture
(
InputArray
mat_
,
bool
bgra
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
cv
::
GlTexture
::
GlTexture
(
InputArray
mat_
,
bool
bgra
)
:
rows_
(
0
),
cols_
(
0
),
type_
(
0
)
,
buf_
(
GlBuffer
::
TEXTURE_BUFFER
)
{
#ifndef HAVE_OPENGL
(
void
)
mat_
;
...
...
@@ -1058,8 +1058,8 @@ void cv::GlTexture::copyFrom(InputArray mat_, bool bgra)
throw_nocuda
;
#else
GpuMat
d_mat
=
mat_
.
getGpuMat
();
GlBuffer
buf
(
d_mat
,
GlBuffer
::
TEXTURE_BUFFER
);
impl_
->
copyFrom
(
buf
,
bgra
);
buf_
.
copyFrom
(
d_mat
);
impl_
->
copyFrom
(
buf
_
,
bgra
);
#endif
break
;
...
...
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