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
a3eda725
Commit
a3eda725
authored
Jun 23, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Implement wglCreateContextAttribsARB.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f2bb2064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
opengl.c
dlls/wineandroid.drv/opengl.c
+45
-0
No files found.
dlls/wineandroid.drv/opengl.c
View file @
a3eda725
...
...
@@ -290,6 +290,47 @@ static const char *android_wglGetExtensionsStringEXT(void)
}
/***********************************************************************
* android_wglCreateContextAttribsARB
*/
static
struct
wgl_context
*
android_wglCreateContextAttribsARB
(
HDC
hdc
,
struct
wgl_context
*
share
,
const
int
*
attribs
)
{
int
count
=
0
,
egl_attribs
[
3
];
BOOL
opengl_es
=
FALSE
;
while
(
attribs
&&
*
attribs
&&
count
<
2
)
{
switch
(
*
attribs
)
{
case
WGL_CONTEXT_PROFILE_MASK_ARB
:
if
(
attribs
[
1
]
==
WGL_CONTEXT_ES2_PROFILE_BIT_EXT
)
opengl_es
=
TRUE
;
break
;
case
WGL_CONTEXT_MAJOR_VERSION_ARB
:
egl_attribs
[
count
++
]
=
EGL_CONTEXT_CLIENT_VERSION
;
egl_attribs
[
count
++
]
=
attribs
[
1
];
break
;
default:
FIXME
(
"Unhandled attributes: %#x %#x
\n
"
,
attribs
[
0
],
attribs
[
1
]);
}
attribs
+=
2
;
}
if
(
!
opengl_es
)
{
WARN
(
"Requested creation of an OpenGL (non ES) context, that's not supported.
\n
"
);
return
NULL
;
}
if
(
!
count
)
/* FIXME: force version if not specified */
{
egl_attribs
[
count
++
]
=
EGL_CONTEXT_CLIENT_VERSION
;
egl_attribs
[
count
++
]
=
egl_client_version
;
}
egl_attribs
[
count
]
=
EGL_NONE
;
return
create_context
(
hdc
,
share
,
egl_attribs
);
}
/***********************************************************************
* android_wglSetPixelFormatWINE
*/
static
BOOL
android_wglSetPixelFormatWINE
(
HDC
hdc
,
int
format
)
...
...
@@ -508,6 +549,10 @@ static void init_extensions(void)
{
void
*
ptr
;
register_extension
(
"WGL_ARB_create_context"
);
register_extension
(
"WGL_ARB_create_context_profile"
);
egl_funcs
.
ext
.
p_wglCreateContextAttribsARB
=
android_wglCreateContextAttribsARB
;
register_extension
(
"WGL_ARB_extensions_string"
);
egl_funcs
.
ext
.
p_wglGetExtensionsStringARB
=
android_wglGetExtensionsStringARB
;
...
...
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