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
334aacd5
Commit
334aacd5
authored
Jun 20, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jun 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use any typedefs in the GL thunks to prevent all possible
compilation issues.
parent
9a401a0b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
make_opengl
dlls/opengl32/make_opengl
+25
-13
opengl_ext.c
dlls/opengl32/opengl_ext.c
+0
-0
opengl_norm.c
dlls/opengl32/opengl_norm.c
+2
-5
No files found.
dlls/opengl32/make_opengl
View file @
334aacd5
...
...
@@ -140,6 +140,26 @@ $gen_traces = 1;
"_GLfuncptr"
=>
[
"ptr"
,
4
]);
#
# Used to convert some types
#
sub
ConvertType
{
my
(
$type
)
=
@_
;
%
hash
=
(
"GLstring"
=>
"const GLubyte *"
,
"GLintptrARB"
=>
"ptrdiff_t"
,
"GLsizeiptrARB"
=>
"ptrdiff_t"
,
"GLhalfNV"
=>
"unsigned short"
);
foreach
$org
(
keys
%
hash
)
{
if
(
$type
=~
/$org/
)
{
(
$before
,
$after
)
=
(
$type
=~
/^(.*)$org(.*)$/
);
return
"$before$hash{$org}$after"
;
}
}
return
$type
;
}
#
# This functions generates the thunk for a given function.
#
sub
GenerateThunk
{
...
...
@@ -155,11 +175,11 @@ sub GenerateThunk {
$ret
=
$ret
.
" * "
.
$func_ref
->
[
0
]
.
" (OPENGL32.@)\n"
;
$ret
=
$ret
.
" */\n"
;
}
$ret
=
$ret
.
$func_ref
->
[
1
]
.
" WINAPI wine_"
.
$func_ref
->
[
0
]
.
"( "
;
$ret
=
$ret
.
ConvertType
(
$func_ref
->
[
1
])
.
" WINAPI wine_"
.
$func_ref
->
[
0
]
.
"( "
;
for
(
$i
=
0
;
$i
<=
$#
{
@
{
$func_ref
->
[
2
]}};
$i
++
)
{
$type
=
$func_ref
->
[
2
]
->
[
$i
]
->
[
0
];
$name
=
$func_ref
->
[
2
]
->
[
$i
]
->
[
1
];
$ret
=
$ret
.
"$type
$name"
;
$ret
=
$ret
.
ConvertType
(
$type
)
.
"
$name"
;
$call_arg
=
$call_arg
.
"$name"
;
if
(
$type
=~
/\*/
)
{
$trace_arg
=
$trace_arg
.
"%p"
;
...
...
@@ -177,7 +197,7 @@ sub GenerateThunk {
}
$ret
=
$ret
.
") {\n"
;
if
(
$func_ref
->
[
1
]
ne
"void"
)
{
$ret
=
$ret
.
" "
.
$func_ref
->
[
1
]
.
" ret_value;\n"
;
$ret
=
$ret
.
" "
.
ConvertType
(
$func_ref
->
[
1
])
.
" ret_value;\n"
;
}
if
(
$gen_traces
)
{
$ret
=
$ret
.
" TRACE(\"("
.
$trace_arg
.
")\\n\""
;
...
...
@@ -576,8 +596,6 @@ print NORM "
#include \"opengl_ext.h\"
#include \"wine/debug.h\"
typedef const GLubyte * GLstring;
WINE_DEFAULT_DEBUG_CHANNEL(opengl);
"
;
...
...
@@ -599,14 +617,8 @@ print EXT "
#include \"opengl_ext.h\"
#include \"wine/debug.h\"
typedef const GLubyte * GLstring;
WINE_DEFAULT_DEBUG_CHANNEL(opengl);
typedef ptrdiff_t GLintptrARB;
typedef ptrdiff_t GLsizeiptrARB;
typedef unsigned short GLhalfNV;
"
;
# First, generate the function pointers
...
...
@@ -614,7 +626,7 @@ foreach (sort keys %ext_functions) {
$func_ref
=
$ext_functions
{
$_
};
print
EXT
$func_ref
->
[
1
]
.
" (*"
.
$ext_prefix
.
$func_ref
->
[
0
]
.
")( "
;
for
(
$i
=
0
;
$i
<=
$#
{
@
{
$func_ref
->
[
2
]}};
$i
++
)
{
$type
=
$func_ref
->
[
2
]
->
[
$i
]
->
[
0
]
;
$type
=
ConvertType
(
$func_ref
->
[
2
]
->
[
$i
]
->
[
0
])
;
print
EXT
"$type"
;
if
(
$i
!=
$#
{
@
{
$func_ref
->
[
2
]}})
{
print
EXT
", "
;
...
...
@@ -631,7 +643,7 @@ foreach (sort keys %ext_functions) {
$func_ref
=
$ext_functions
{
$_
};
print
EXT
$func_ref
->
[
1
]
.
" WINAPI "
.
"wine_"
.
$func_ref
->
[
0
]
.
"( "
;
for
(
$i
=
0
;
$i
<=
$#
{
@
{
$func_ref
->
[
2
]}};
$i
++
)
{
$type
=
$func_ref
->
[
2
]
->
[
$i
]
->
[
0
]
;
$type
=
ConvertType
(
$func_ref
->
[
2
]
->
[
$i
]
->
[
0
])
;
print
EXT
"$type"
;
if
(
$i
!=
$#
{
@
{
$func_ref
->
[
2
]}})
{
print
EXT
", "
;
...
...
dlls/opengl32/opengl_ext.c
View file @
334aacd5
This diff is collapsed.
Click to expand it.
dlls/opengl32/opengl_norm.c
View file @
334aacd5
...
...
@@ -5,8 +5,6 @@
#include "opengl_ext.h"
#include "wine/debug.h"
typedef
const
GLubyte
*
GLstring
;
WINE_DEFAULT_DEBUG_CHANNEL
(
opengl
);
/***********************************************************************
...
...
@@ -1518,8 +1516,8 @@ void WINAPI wine_glGetSeparableFilter( GLenum target, GLenum format, GLenum type
/***********************************************************************
* glGetString (OPENGL32.@)
*/
GLstring
WINAPI
wine_glGetString
(
GLenum
name
)
{
GLstring
ret_value
;
const
GLubyte
*
WINAPI
wine_glGetString
(
GLenum
name
)
{
const
GLubyte
*
ret_value
;
TRACE
(
"(%d)
\n
"
,
name
);
ENTER_GL
();
ret_value
=
glGetString
(
name
);
...
...
@@ -4104,4 +4102,3 @@ void WINAPI wine_glViewport( GLint x, GLint y, GLsizei width, GLsizei height ) {
glViewport
(
x
,
y
,
width
,
height
);
LEAVE_GL
();
}
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