Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
f0ecc092
Commit
f0ecc092
authored
Nov 16, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1901 from paroj:ovisup
parents
aaf46f1c
ccd99930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
ovis.cpp
modules/ovis/src/ovis.cpp
+24
-2
No files found.
modules/ovis/src/ovis.cpp
View file @
f0ecc092
...
...
@@ -236,6 +236,8 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
return
ret
;
}
size_t
numWindows
()
const
{
return
mWindows
.
size
();
}
void
locateResources
()
CV_OVERRIDE
{
OgreBites
::
ApplicationContext
::
locateResources
();
...
...
@@ -277,9 +279,10 @@ class WindowSceneImpl : public WindowScene
Ptr
<
Rectangle2D
>
bgplane
;
Ogre
::
RenderTarget
*
depthRTT
;
int
flags
;
public
:
WindowSceneImpl
(
Ptr
<
Application
>
app
,
const
String
&
_title
,
const
Size
&
sz
,
int
flags
)
:
title
(
_title
),
root
(
app
->
getRoot
()),
depthRTT
(
NULL
)
WindowSceneImpl
(
Ptr
<
Application
>
app
,
const
String
&
_title
,
const
Size
&
sz
,
int
_
flags
)
:
title
(
_title
),
root
(
app
->
getRoot
()),
depthRTT
(
NULL
)
,
flags
(
_flags
)
{
if
(
!
app
->
sceneMgr
)
{
...
...
@@ -337,6 +340,25 @@ public:
rWin
->
addViewport
(
cam
);
}
~
WindowSceneImpl
()
{
if
(
flags
&
SCENE_SEPERATE
)
{
MaterialManager
::
getSingleton
().
remove
(
bgplane
->
getMaterial
());
bgplane
.
release
();
String
texName
=
sceneMgr
->
getName
()
+
"_Background"
;
TextureManager
::
getSingleton
().
remove
(
texName
,
RESOURCEGROUP_NAME
);
}
if
(
_app
->
sceneMgr
==
sceneMgr
&&
(
flags
&
SCENE_SEPERATE
))
{
// this is the root window owning the context
CV_Assert
(
_app
->
numWindows
()
==
1
&&
"the first OVIS window must be deleted last"
);
_app
->
closeApp
();
_app
.
release
();
}
}
void
setBackground
(
InputArray
image
)
CV_OVERRIDE
{
CV_Assert
(
bgplane
);
...
...
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