Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5e6d3c15
Commit
5e6d3c15
authored
Aug 13, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: GDI support is not advertised with double buffering.
parent
85867205
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
opengl.c
dlls/opengl32/tests/opengl.c
+26
-0
opengl.c
dlls/winex11.drv/opengl.c
+12
-1
No files found.
dlls/opengl32/tests/opengl.c
View file @
5e6d3c15
...
...
@@ -35,6 +35,9 @@ static int (WINAPI *pwglReleasePbufferDCARB)(HPBUFFERARB, HDC);
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_SUPPORT_GDI_ARB 0x200F
#define WGL_DOUBLE_BUFFER_ARB 0x2011
static
BOOL
(
WINAPI
*
pwglChoosePixelFormatARB
)(
HDC
,
const
int
*
,
const
FLOAT
*
,
UINT
,
int
*
,
UINT
*
);
static
BOOL
(
WINAPI
*
pwglGetPixelFormatAttribivARB
)(
HDC
,
int
,
int
,
UINT
,
const
int
*
,
int
*
);
...
...
@@ -225,6 +228,28 @@ static void test_colorbits(HDC hdc)
iAttribRet
[
0
],
iAttribRet
[
1
]);
}
static
void
test_gdi_dbuf
(
HDC
hdc
)
{
const
int
iAttribList
[]
=
{
WGL_SUPPORT_GDI_ARB
,
WGL_DOUBLE_BUFFER_ARB
};
int
iAttribRet
[
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
])];
unsigned
int
nFormats
;
int
iPixelFormat
;
int
res
;
nFormats
=
DescribePixelFormat
(
hdc
,
0
,
0
,
NULL
);
for
(
iPixelFormat
=
1
;
iPixelFormat
<=
nFormats
;
iPixelFormat
++
)
{
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]),
iAttribList
,
iAttribRet
);
ok
(
res
!=
FALSE
,
"wglGetPixelFormatAttribivARB failed for pixel format %d
\n
"
,
iPixelFormat
);
if
(
res
==
FALSE
)
continue
;
ok
(
!
(
iAttribRet
[
0
]
&&
iAttribRet
[
1
]),
"GDI support and double buffering on pixel format %d
\n
"
,
iPixelFormat
);
}
}
START_TEST
(
opengl
)
{
HWND
hwnd
;
...
...
@@ -274,6 +299,7 @@ START_TEST(opengl)
test_setpixelformat
();
test_colorbits
(
hdc
);
test_gdi_dbuf
(
hdc
);
wgl_extensions
=
pwglGetExtensionsStringARB
(
hdc
);
if
(
wgl_extensions
==
NULL
)
skip
(
"Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!
\n
"
);
...
...
dlls/winex11.drv/opengl.c
View file @
5e6d3c15
...
...
@@ -1301,7 +1301,11 @@ int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
if
(
value
==
GLX_SLOW_CONFIG
)
ppfd
->
dwFlags
|=
PFD_GENERIC_ACCELERATED
;
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_DOUBLEBUFFER
,
&
value
);
if
(
value
)
ppfd
->
dwFlags
|=
PFD_DOUBLEBUFFER
;
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_DOUBLEBUFFER
,
&
value
);
if
(
value
)
{
ppfd
->
dwFlags
|=
PFD_DOUBLEBUFFER
;
ppfd
->
dwFlags
&=
~
PFD_SUPPORT_GDI
;
}
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_STEREO
,
&
value
);
if
(
value
)
ppfd
->
dwFlags
|=
PFD_STEREO
;
/* Pixel type */
...
...
@@ -2773,6 +2777,13 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
break
;
case
WGL_SUPPORT_GDI_ARB
:
if
(
!
fmt
)
goto
pix_error
;
hTest
=
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_DOUBLEBUFFER
,
&
tmp
);
if
(
hTest
)
goto
get_error
;
if
(
tmp
)
{
piValues
[
i
]
=
GL_FALSE
;
continue
;
}
curGLXAttr
=
GLX_X_RENDERABLE
;
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