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
33ca17e1
Commit
33ca17e1
authored
Jul 16, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fill a function table with the standard OpenGL functions and store it in the TEB.
parent
edb0044e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
opengl.c
dlls/winex11.drv/opengl.c
+19
-0
No files found.
dlls/winex11.drv/opengl.c
View file @
33ca17e1
...
...
@@ -48,6 +48,7 @@
#include "x11drv.h"
#include "winternl.h"
#include "wine/wgl_driver.h"
#include "wine/library.h"
#include "wine/debug.h"
...
...
@@ -210,6 +211,12 @@ static int use_render_texture_emulation = 1;
static
BOOL
has_swap_control
;
static
int
swap_interval
=
1
;
static
struct
opengl_funcs
opengl_funcs
;
#define USE_GL_FUNC(name) #name,
static
const
char
*
opengl_func_names
[]
=
{
ALL_WGL_FUNCS
};
#undef USE_GL_FUNC
#define MAX_EXTENSIONS 16
static
const
WineGLExtension
*
WineGLExtensionList
[
MAX_EXTENSIONS
];
static
int
WineGLExtensionListSize
;
...
...
@@ -482,6 +489,7 @@ static BOOL has_opengl(void)
char
buffer
[
200
];
int
error_base
,
event_base
;
unsigned
int
i
;
if
(
init_done
)
return
(
opengl_handle
!=
NULL
);
init_done
=
1
;
...
...
@@ -496,6 +504,15 @@ static BOOL has_opengl(void)
return
FALSE
;
}
for
(
i
=
0
;
i
<
sizeof
(
opengl_func_names
)
/
sizeof
(
opengl_func_names
[
0
]);
i
++
)
{
if
(
!
(((
void
**
)
&
opengl_funcs
.
gl
)[
i
]
=
wine_dlsym
(
opengl_handle
,
opengl_func_names
[
i
],
NULL
,
0
)))
{
ERR
(
"%s not found in libGL, disabling OpenGL.
\n
"
,
opengl_func_names
[
i
]
);
goto
failed
;
}
}
pglXGetProcAddressARB
=
wine_dlsym
(
opengl_handle
,
"glXGetProcAddressARB"
,
NULL
,
0
);
if
(
pglXGetProcAddressARB
==
NULL
)
{
ERR
(
"Could not find glXGetProcAddressARB in libGL, disabling OpenGL.
\n
"
);
...
...
@@ -1627,6 +1644,7 @@ static BOOL glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx)
if
(
ret
)
{
NtCurrentTeb
()
->
glTable
=
&
opengl_funcs
;
NtCurrentTeb
()
->
glContext
=
ctx
;
ctx
->
has_been_current
=
TRUE
;
...
...
@@ -1698,6 +1716,7 @@ static BOOL glxdrv_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct
ctx
->
drawables
[
0
]
=
escape_draw
.
gl_drawable
;
ctx
->
drawables
[
1
]
=
escape_read
.
gl_drawable
;
ctx
->
refresh_drawables
=
FALSE
;
NtCurrentTeb
()
->
glTable
=
&
opengl_funcs
;
NtCurrentTeb
()
->
glContext
=
ctx
;
}
else
...
...
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