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
60eeb92a
Commit
60eeb92a
authored
Nov 07, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Build with msvcrt.
parent
5902cfd2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
17 deletions
+39
-17
Makefile.in
dlls/opengl32/Makefile.in
+3
-1
make_opengl
dlls/opengl32/make_opengl
+11
-5
unix_thunks.c
dlls/opengl32/unix_thunks.c
+7
-1
unix_wgl.c
dlls/opengl32/unix_wgl.c
+0
-0
unixlib.h
dlls/opengl32/unixlib.h
+3
-3
wgl.c
dlls/opengl32/wgl.c
+15
-7
No files found.
dlls/opengl32/Makefile.in
View file @
60eeb92a
MODULE
=
opengl32.dll
UNIXLIB
=
opengl32.so
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
-D_OPENGL32_
IMPORTLIB
=
opengl32
IMPORTS
=
user32 gdi32 advapi32 win32u
DELAYIMPORTS
=
glu32
UNIX_LIBS
=
-lwin32u
EXTRADLLFLAGS
=
-Wl
,--image-base,0x7a800000
-mcygwin
EXTRADLLFLAGS
=
-Wl
,--image-base,0x7a800000
C_SRCS
=
\
thunks.c
\
...
...
dlls/opengl32/make_opengl
View file @
60eeb92a
...
...
@@ -815,6 +815,7 @@ foreach (sort keys %ext_functions)
print
OUT
"enum unix_funcs\n"
;
print
OUT
"{\n"
;
print
OUT
" unix_thread_attach,\n"
;
foreach
(
sort
keys
%
wgl_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
...
...
@@ -846,11 +847,10 @@ print OUT " GLsizei length;\n";
print
OUT
" const GLchar *message;\n"
;
print
OUT
"};\n\n"
;
print
OUT
"typedef NTSTATUS (*unixlib_function_t)( void *args );\n"
;
print
OUT
"extern const unixlib_function_t __wine_unix_call_funcs[] DECLSPEC_HIDDEN;\n"
;
print
OUT
"#define UNIX_CALL( func, params ) __wine_unix_call_funcs[unix_ ## func]( params )\n"
;
print
OUT
"extern unixlib_handle_t unixlib_handle DECLSPEC_HIDDEN;\n"
;
print
OUT
"#define UNIX_CALL( func, params ) __wine_unix_call( unixlib_handle, unix_ ## func, params )\n\n"
;
print
OUT
"
\n
#endif /* __WINE_OPENGL32_UNIXLIB_H */\n"
;
print
OUT
"#endif /* __WINE_OPENGL32_UNIXLIB_H */\n"
;
close
OUT
;
#
...
...
@@ -917,6 +917,10 @@ close OUT;
open
OUT
,
">unix_thunks.c"
or
die
"cannot create unix_thunks.c"
;
print
OUT
"/* Automatically generated from http://www.opengl.org/registry files; DO NOT EDIT! */\n\n"
;
print
OUT
"#if 0\n"
;
print
OUT
"#pragma makedep unix\n"
;
print
OUT
"#endif\n\n"
;
print
OUT
"#include <stdarg.h>\n"
;
print
OUT
"#include <stddef.h>\n\n"
;
...
...
@@ -929,6 +933,7 @@ print OUT "#include \"wingdi.h\"\n\n";
print
OUT
"#include \"unixlib.h\"\n"
;
print
OUT
"#include \"unix_private.h\"\n\n"
;
print
OUT
"extern NTSTATUS thread_attach( void *args ) DECLSPEC_HIDDEN;\n"
;
foreach
(
sort
keys
%
wgl_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
...
...
@@ -968,8 +973,9 @@ foreach (sort keys %ext_functions)
print
OUT
generate_unix_thunk
(
$_
,
$ext_functions
{
$_
},
"ext"
);
}
print
OUT
"const unixlib_
function
_t __wine_unix_call_funcs[] =\n"
;
print
OUT
"const unixlib_
entry
_t __wine_unix_call_funcs[] =\n"
;
print
OUT
"{\n"
;
print
OUT
" &thread_attach,\n"
;
foreach
(
sort
keys
%
wgl_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
...
...
dlls/opengl32/unix_thunks.c
View file @
60eeb92a
/* Automatically generated from http://www.opengl.org/registry files; DO NOT EDIT! */
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stddef.h>
...
...
@@ -12,6 +16,7 @@
#include "unixlib.h"
#include "unix_private.h"
extern
NTSTATUS
thread_attach
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wgl_wglCopyContext
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wgl_wglCreateContext
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wgl_wglDeleteContext
(
void
*
args
)
DECLSPEC_HIDDEN
;
...
...
@@ -24141,8 +24146,9 @@ static NTSTATUS ext_wglSwapIntervalEXT( void *args )
return
STATUS_SUCCESS
;
}
const
unixlib_
function
_t
__wine_unix_call_funcs
[]
=
const
unixlib_
entry
_t
__wine_unix_call_funcs
[]
=
{
&
thread_attach
,
&
wgl_wglCopyContext
,
&
wgl_wglCreateContext
,
&
wgl_wglDeleteContext
,
dlls/opengl32/unix_wgl.c
View file @
60eeb92a
This diff is collapsed.
Click to expand it.
dlls/opengl32/unixlib.h
View file @
60eeb92a
...
...
@@ -22293,6 +22293,7 @@ struct wglSwapIntervalEXT_params
enum
unix_funcs
{
unix_thread_attach
,
unix_wglCopyContext
,
unix_wglCreateContext
,
unix_wglDeleteContext
,
...
...
@@ -25349,8 +25350,7 @@ struct wine_gl_debug_message_params
const
GLchar
*
message
;
};
typedef
NTSTATUS
(
*
unixlib_function_t
)(
void
*
args
);
extern
const
unixlib_function_t
__wine_unix_call_funcs
[]
DECLSPEC_HIDDEN
;
#define UNIX_CALL( func, params ) __wine_unix_call_funcs[unix_ ## func]( params )
extern
unixlib_handle_t
unixlib_handle
DECLSPEC_HIDDEN
;
#define UNIX_CALL( func, params ) __wine_unix_call( unixlib_handle, unix_ ## func, params )
#endif
/* __WINE_OPENGL32_UNIXLIB_H */
dlls/opengl32/wgl.c
View file @
60eeb92a
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <math.h>
...
...
@@ -40,6 +38,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wgl
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
unixlib_handle_t
unixlib_handle
;
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
/***********************************************************************
...
...
@@ -865,25 +865,33 @@ static BOOL WINAPI call_opengl_debug_message_callback( struct wine_gl_debug_mess
return
TRUE
;
}
extern
struct
opengl_funcs
null_opengl_funcs
DECLSPEC_HIDDEN
;
/***********************************************************************
* OpenGL initialisation routine
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
void
**
kernel_callback_table
;
NTSTATUS
status
;
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
NtCurrentTeb
()
->
glTable
=
&
null_opengl_funcs
;
if
((
status
=
NtQueryVirtualMemory
(
GetCurrentProcess
(),
hinst
,
MemoryWineUnixFuncs
,
&
unixlib_handle
,
sizeof
(
unixlib_handle
),
NULL
)))
{
ERR
(
"Failed to load unixlib, status %#x
\n
"
,
status
);
return
FALSE
;
}
kernel_callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
kernel_callback_table
[
NtUserCallOpenGLDebugMessageCallback
]
=
call_opengl_debug_message_callback
;
break
;
/* fallthrough */
case
DLL_THREAD_ATTACH
:
NtCurrentTeb
()
->
glTable
=
&
null_opengl_funcs
;
if
((
status
=
UNIX_CALL
(
thread_attach
,
NULL
)))
{
WARN
(
"Failed to initialize thread, status %#x
\n
"
,
status
);
return
FALSE
;
}
break
;
}
return
TRUE
;
...
...
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