Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
751b55f4
Commit
751b55f4
authored
May 28, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32/tests: Add a couple of test cases for pixel format handle on window DCs.
parent
2d9b3813
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
opengl.c
dlls/opengl32/tests/opengl.c
+37
-0
No files found.
dlls/opengl32/tests/opengl.c
View file @
751b55f4
...
...
@@ -182,6 +182,7 @@ static void test_setpixelformat(HDC winhdc)
int
nCfgs
;
int
pf
;
int
i
;
HWND
hwnd
;
PIXELFORMATDESCRIPTOR
pfd
=
{
sizeof
(
PIXELFORMATDESCRIPTOR
),
1
,
/* version */
...
...
@@ -226,6 +227,42 @@ static void test_setpixelformat(HDC winhdc)
if
(
i
==
pf
)
ok
(
res
,
"Failed to set the same pixel format
\n
"
);
else
ok
(
!
res
,
"Unexpectedly set an alternate pixel format
\n
"
);
}
hwnd
=
CreateWindow
(
"static"
,
"Title"
,
WS_OVERLAPPEDWINDOW
,
10
,
10
,
200
,
200
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"err: %d
\n
"
,
GetLastError
());
if
(
hwnd
)
{
HDC
hdc
=
GetDC
(
hwnd
);
pf
=
ChoosePixelFormat
(
hdc
,
&
pfd
);
ok
(
pf
!=
0
,
"ChoosePixelFormat failed
\n
"
);
res
=
SetPixelFormat
(
hdc
,
pf
,
&
pfd
);
ok
(
res
!=
0
,
"SetPixelFormat failed
\n
"
);
i
=
GetPixelFormat
(
hdc
);
ok
(
i
==
pf
,
"GetPixelFormat returned wrong format %d/%d
\n
"
,
i
,
pf
);
ReleaseDC
(
hwnd
,
hdc
);
hdc
=
GetWindowDC
(
hwnd
);
i
=
GetPixelFormat
(
hdc
);
ok
(
i
==
pf
,
"GetPixelFormat returned wrong format %d/%d
\n
"
,
i
,
pf
);
ReleaseDC
(
hwnd
,
hdc
);
DestroyWindow
(
hwnd
);
}
hwnd
=
CreateWindow
(
"static"
,
"Title"
,
WS_OVERLAPPEDWINDOW
,
10
,
10
,
200
,
200
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"err: %d
\n
"
,
GetLastError
());
if
(
hwnd
)
{
HDC
hdc
=
GetWindowDC
(
hwnd
);
pf
=
ChoosePixelFormat
(
hdc
,
&
pfd
);
ok
(
pf
!=
0
,
"ChoosePixelFormat failed
\n
"
);
res
=
SetPixelFormat
(
hdc
,
pf
,
&
pfd
);
ok
(
res
!=
0
,
"SetPixelFormat failed
\n
"
);
i
=
GetPixelFormat
(
hdc
);
ok
(
i
==
pf
,
"GetPixelFormat returned wrong format %d/%d
\n
"
,
i
,
pf
);
ReleaseDC
(
hwnd
,
hdc
);
DestroyWindow
(
hwnd
);
}
}
static
void
test_colorbits
(
HDC
hdc
)
...
...
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