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
4ad17c0c
Commit
4ad17c0c
authored
Aug 14, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Dynamically load OpenGL.
parent
261f02ca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
Makefile.in
dlls/wined3d/Makefile.in
+1
-2
directx.c
dlls/wined3d/directx.c
+19
-14
wined3d_gl.h
include/wine/wined3d_gl.h
+0
-0
No files found.
dlls/wined3d/Makefile.in
View file @
4ad17c0c
...
...
@@ -5,8 +5,7 @@ VPATH = @srcdir@
MODULE
=
wined3d.dll
IMPORTLIB
=
libwined3d.
$(IMPLIBEXT)
IMPORTS
=
user32 gdi32 advapi32 kernel32
EXTRAINCL
=
@X_CFLAGS@
EXTRALIBS
=
-luuid
@X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ @OPENGL_LIBS@
EXTRALIBS
=
-luuid
C_SRCS
=
\
arb_program_shader.c
\
...
...
dlls/wined3d/directx.c
View file @
4ad17c0c
...
...
@@ -414,6 +414,24 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
TRACE_
(
d3d_caps
)(
"(%p)
\n
"
,
gl_info
);
/* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */
mod_gl
=
LoadLibraryA
(
"gdi32.dll"
);
if
(
!
mod_gl
)
{
ERR
(
"Can't load gdi32.dll!
\n
"
);
return
FALSE
;
}
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetProcAddress"
);
if
(
!
p_wglGetProcAddress
)
{
ERR
(
"Unable to load wglGetProcAddress!
\n
"
);
return
FALSE
;
}
/* Dynamicly load all GL core functions */
#define USE_GL_FUNC(pfn) pfn = (void*)p_wglGetProcAddress( (const char *) #pfn);
GL_FUNCS_GEN
;
#undef USE_GL_FUNC
gl_string
=
(
const
char
*
)
glGetString
(
GL_RENDERER
);
if
(
NULL
==
gl_string
)
gl_string
=
"None"
;
...
...
@@ -579,20 +597,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
gl_info
->
vs_arb_constantsF
=
0
;
gl_info
->
ps_arb_constantsF
=
0
;
/* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */
mod_gl
=
LoadLibraryA
(
"gdi32.dll"
);
if
(
!
mod_gl
)
{
ERR
(
"Can't load gdi32.dll!
\n
"
);
return
FALSE
;
}
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetProcAddress"
);
if
(
!
p_wglGetProcAddress
)
{
ERR
(
"Unable to load wglGetProcAddress!
\n
"
);
return
FALSE
;
}
/* Now work out what GL support this card really has */
/* Now work out what GL support this card really has */
#define USE_GL_FUNC(type, pfn) gl_info->pfn = (type) p_wglGetProcAddress( (const char *) #pfn);
GL_EXT_FUNCS_GEN
;
WGL_EXT_FUNCS_GEN
;
...
...
include/wine/wined3d_gl.h
View file @
4ad17c0c
This diff is collapsed.
Click to expand it.
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