Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
deprecated-irrlicht-mac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
deprecated-irrlicht-mac
Commits
69bc11c8
Commit
69bc11c8
authored
Sep 13, 2010
by
hybrid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
svn://svn.code.sf.net/p/irrlicht/code/trunk@3409
dfc29bdd-3216-0410-991c-e03cc46cb475
parent
d6eb580f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
tests/drawRectOutline.cpp
tests/drawRectOutline.cpp
+22
-3
tests/media/Direct3D 9.0-drawRectOutline.png
tests/media/Direct3D 9.0-drawRectOutline.png
+0
-0
tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png
tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png
+0
-0
tests/media/OpenGL-drawRectOutline.png
tests/media/OpenGL-drawRectOutline.png
+0
-0
No files found.
tests/drawRectOutline.cpp
View file @
69bc11c8
...
...
@@ -2,10 +2,13 @@
using
namespace
irr
;
bool
drawRectOutline
(
void
)
bool
testWithDriver
(
video
::
E_DRIVER_TYPE
driverType
)
{
IrrlichtDevice
*
device
=
createDevice
(
video
::
EDT_BURNINGSVIDEO
,
core
::
dimension2du
(
160
,
120
));
createDevice
(
driverType
,
core
::
dimension2du
(
160
,
120
));
if
(
!
device
)
return
true
;
video
::
IVideoDriver
*
driver
=
device
->
getVideoDriver
();
driver
->
beginScene
(
true
,
true
,
video
::
SColor
(
255
,
100
,
101
,
140
));
...
...
@@ -18,11 +21,27 @@ bool drawRectOutline(void)
r
+=
core
::
position2di
(
10
,
10
);
driver
->
draw2DRectangleOutline
(
r
,
video
::
SColor
(
128
,
255
,
128
,
128
)
);
driver
->
getMaterial2D
().
Thickness
=
12.
f
;
driver
->
enableMaterial2D
();
r
+=
core
::
position2di
(
10
,
10
);
driver
->
draw2DRectangleOutline
(
r
,
video
::
SColor
(
128
,
255
,
128
,
128
)
);
driver
->
endScene
();
bool
result
=
takeScreenshotAndCompareAgainstReference
(
driver
,
"-drawRectOutline.png"
);
bool
result
=
takeScreenshotAndCompareAgainstReference
(
driver
,
"-drawRectOutline.png"
,
99.9
f
);
device
->
drop
();
return
result
;
}
bool
drawRectOutline
(
void
)
{
// TODO: Only OpenGL supports thick lines
bool
result
=
testWithDriver
(
video
::
EDT_BURNINGSVIDEO
);
result
&=
testWithDriver
(
video
::
EDT_DIRECT3D8
);
result
&=
testWithDriver
(
video
::
EDT_DIRECT3D9
);
result
&=
testWithDriver
(
video
::
EDT_OPENGL
);
result
&=
testWithDriver
(
video
::
EDT_SOFTWARE
);
return
result
;
}
tests/media/Direct3D 9.0-drawRectOutline.png
0 → 100644
View file @
69bc11c8
545 Bytes
tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png
0 → 100644
View file @
69bc11c8
538 Bytes
tests/media/OpenGL-drawRectOutline.png
0 → 100644
View file @
69bc11c8
594 Bytes
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