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
9e899785
Commit
9e899785
authored
Feb 06, 2018
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovis: add SCENE_AA flag to allow pixel-exact rendering
parent
4c1802a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ovis.hpp
modules/ovis/include/opencv2/ovis.hpp
+3
-1
ovis.cpp
modules/ovis/src/ovis.cpp
+8
-4
No files found.
modules/ovis/include/opencv2/ovis.hpp
View file @
9e899785
...
...
@@ -26,6 +26,8 @@ enum SceneSettings
SCENE_SHOW_CS_CROSS
=
4
,
/// @ref WindowScene::getScreenshot returns images as CV_32FC4 instead of CV_8UC3
SCENE_RENDER_FLOAT
=
8
,
/// Apply anti-aliasing. The first window determines the setting for all windows.
SCENE_AA
=
16
};
enum
MaterialProperty
...
...
@@ -180,7 +182,7 @@ CV_EXPORTS_W void addResourceLocation(const String& path);
* @param flags a combination of @ref SceneSettings
*/
CV_EXPORTS_W
Ptr
<
WindowScene
>
createWindow
(
const
String
&
title
,
const
Size
&
size
,
int
flags
=
SCENE_INTERACTIVE
);
int
flags
=
SCENE_INTERACTIVE
|
SCENE_AA
);
/**
* update all windows and wait for keyboard event
...
...
modules/ovis/src/ovis.cpp
View file @
9e899785
...
...
@@ -144,10 +144,11 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
uint32_t
w
;
uint32_t
h
;
int
key_pressed
;
int
flags
;
Application
(
const
Ogre
::
String
&
_title
,
const
Size
&
sz
)
Application
(
const
Ogre
::
String
&
_title
,
const
Size
&
sz
,
int
_flags
)
:
OgreBites
::
ApplicationContext
(
"ovis"
,
false
),
sceneMgr
(
NULL
),
title
(
_title
),
w
(
sz
.
width
),
h
(
sz
.
height
),
key_pressed
(
-
1
)
h
(
sz
.
height
),
key_pressed
(
-
1
)
,
flags
(
_flags
)
{
logMgr
.
reset
(
new
LogManager
());
logMgr
->
createLog
(
"ovis.log"
,
true
,
true
,
true
);
...
...
@@ -183,7 +184,10 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
_h
=
h
;
_name
=
title
;
}
miscParams
[
"FSAA"
]
=
"4"
;
if
(
flags
&
SCENE_AA
)
miscParams
[
"FSAA"
]
=
"4"
;
miscParams
[
"vsync"
]
=
"true"
;
OgreBites
::
NativeWindowPair
ret
=
...
...
@@ -539,7 +543,7 @@ Ptr<WindowScene> createWindow(const String& title, const Size& size, int flags)
{
if
(
!
_app
)
{
_app
=
makePtr
<
Application
>
(
title
.
c_str
(),
size
);
_app
=
makePtr
<
Application
>
(
title
.
c_str
(),
size
,
flags
);
_app
->
initApp
();
}
...
...
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