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
5bfd5f3d
Commit
5bfd5f3d
authored
Jul 16, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Call standard OpenGL functions through the TEB function table.
parent
33ca17e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
make_opengl
dlls/opengl32/make_opengl
+9
-8
opengl_norm.c
dlls/opengl32/opengl_norm.c
+0
-0
opengl.c
dlls/opengl32/tests/opengl.c
+2
-2
No files found.
dlls/opengl32/make_opengl
View file @
5bfd5f3d
...
...
@@ -225,9 +225,9 @@ sub ConvertVarName($)
#
# This functions generates the thunk for a given function.
#
sub
GenerateThunk
($$$$
$
)
sub
GenerateThunk
($$$$)
{
my
(
$func_ref
,
$comment
,
$prefix
,
$
thread_safe
,
$
local_var
)
=
@_
;
my
(
$func_ref
,
$comment
,
$prefix
,
$local_var
)
=
@_
;
my
$ret
=
""
;
my
$call_arg
=
""
;
my
$trace_call_arg
=
""
;
...
...
@@ -282,8 +282,9 @@ sub GenerateThunk($$$$$)
}
}
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
2
]});
$ret
=
"$ret) {\n"
;
if
(
$func_ref
->
[
1
]
ne
"void"
&&
$thread_safe
)
{
$ret
.=
") {\n"
;
$ret
.=
" const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;\n"
unless
$local_var
;
if
(
$func_ref
->
[
1
]
ne
"void"
&&
$gen_thread_safe
)
{
$ret
=
"$ret "
.
ConvertType
(
$func_ref
->
[
1
])
.
" ret_value;\n"
;
}
$ret
.=
$local_var
;
...
...
@@ -294,7 +295,7 @@ sub GenerateThunk($$$$$)
}
$ret
=
"$ret);\n"
;
}
if
(
$thread_safe
)
{
if
(
$
gen_
thread_safe
)
{
$ret
.=
" ENTER_GL();\n"
;
$ret
.=
" "
;
if
(
$func_ref
->
[
1
]
ne
"void"
)
{
...
...
@@ -806,9 +807,9 @@ print NORM "
WINE_DEFAULT_DEBUG_CHANNEL(opengl);
"
;
foreach
(
sort
keys
%
norm_functions
)
{
my
$string
=
GenerateThunk
(
$norm_functions
{
$_
},
1
,
""
,
$gen_thread_safe
,
""
);
foreach
(
sort
keys
%
norm_functions
)
{
my
$string
=
GenerateThunk
(
$norm_functions
{
$_
},
1
,
"funcs->gl.p_"
,
""
);
print
NORM
"\n$string"
if
$string
;
}
...
...
@@ -864,7 +865,7 @@ foreach (sort keys %ext_functions) {
}
$local_var
.=
'void '
if
(
!
@
{
$func_ref
->
[
2
]});
$local_var
.=
") = extension_funcs[EXT_$func_ref->[0]];\n"
;
print
EXT
"\nstatic "
,
GenerateThunk
(
$ext_functions
{
$_
},
0
,
$ext_prefix
,
$
gen_thread_safe
,
$
local_var
);
print
EXT
"\nstatic "
,
GenerateThunk
(
$ext_functions
{
$_
},
0
,
$ext_prefix
,
$local_var
);
}
# Then the table giving the string <-> function correspondence */
...
...
dlls/opengl32/opengl_norm.c
View file @
5bfd5f3d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dlls/opengl32/tests/opengl.c
View file @
5bfd5f3d
...
...
@@ -1205,7 +1205,7 @@ static void test_destroy(HDC oldhdc)
glClear
(
GL_COLOR_BUFFER_BIT
);
glFinish
();
glerr
=
glGetError
();
todo_wine
ok
(
glerr
==
GL_INVALID_OPERATION
,
"Failed glClear, error %#x.
\n
"
,
glerr
);
ok
(
glerr
==
GL_INVALID_OPERATION
,
"Failed glClear, error %#x.
\n
"
,
glerr
);
SetLastError
(
0xdeadbeef
);
ret
=
SwapBuffers
(
dc
);
err
=
GetLastError
();
...
...
@@ -1363,7 +1363,7 @@ static void test_destroy_read(HDC oldhdc)
glClear
(
GL_COLOR_BUFFER_BIT
);
glFinish
();
glerr
=
glGetError
();
todo_wine
ok
(
glerr
==
GL_INVALID_OPERATION
,
"Failed glClear, error %#x.
\n
"
,
glerr
);
ok
(
glerr
==
GL_INVALID_OPERATION
,
"Failed glClear, error %#x.
\n
"
,
glerr
);
SetLastError
(
0xdeadbeef
);
ret
=
SwapBuffers
(
draw_dc
);
err
=
GetLastError
();
...
...
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