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
83de83e9
Commit
83de83e9
authored
Jun 12, 2000
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jun 12, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- moved the 'constructor' into a real DLL init function
- make OpenGL32 dependant on the X11 driver
parent
5131f21f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
5 deletions
+44
-5
make_opengl
dlls/opengl32/make_opengl
+2
-0
opengl32.spec
dlls/opengl32/opengl32.spec
+2
-0
wgl.c
dlls/opengl32/wgl.c
+40
-5
No files found.
dlls/opengl32/make_opengl
View file @
83de83e9
...
@@ -322,6 +322,8 @@ open(SPEC, ">" . $spec_file);
...
@@ -322,6 +322,8 @@ open(SPEC, ">" . $spec_file);
print
SPEC
"
print
SPEC
"
name opengl32
name opengl32
type win32
type win32
init OpenGL32_Init
import x11drv
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
...
...
dlls/opengl32/opengl32.spec
View file @
83de83e9
name opengl32
name opengl32
type win32
type win32
init OpenGL32_Init
import x11drv
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
...
...
dlls/opengl32/wgl.c
View file @
83de83e9
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
DEFAULT_DEBUG_CHANNEL
(
opengl
);
DEFAULT_DEBUG_CHANNEL
(
opengl
);
static
GLXContext
default_cx
=
NULL
;
typedef
struct
wine_glcontext
{
typedef
struct
wine_glcontext
{
HDC
hdc
;
HDC
hdc
;
GLXContext
ctx
;
GLXContext
ctx
;
...
@@ -449,20 +451,53 @@ BOOL WINAPI wglUseFontOutlinesA(HDC hdc,
...
@@ -449,20 +451,53 @@ BOOL WINAPI wglUseFontOutlinesA(HDC hdc,
return
FALSE
;
return
FALSE
;
}
}
/* This is for brain-dead applications that use OpenGL functions before even
/* This is for brain-dead applications that use OpenGL functions before even
creating a rendering context.... */
creating a rendering context.... */
DECL_GLOBAL_CONSTRUCTOR
(
OpenGL_create_default_context
)
{
static
void
process_attach
(
void
)
{
int
num
;
int
num
;
XVisualInfo
template
;
XVisualInfo
template
;
XVisualInfo
*
vis
;
XVisualInfo
*
vis
=
NULL
;
GLXContext
cx
;
if
(
!
visual
)
{
ERR
(
"X11DRV not loaded yet. Cannot create default context.
\n
"
);
return
;
}
ENTER_GL
();
ENTER_GL
();
template
.
visualid
=
XVisualIDFromVisual
(
visual
);
template
.
visualid
=
XVisualIDFromVisual
(
visual
);
vis
=
XGetVisualInfo
(
display
,
VisualIDMask
,
&
template
,
&
num
);
vis
=
XGetVisualInfo
(
display
,
VisualIDMask
,
&
template
,
&
num
);
cx
=
glXCreateContext
(
display
,
vis
,
0
,
GL_TRUE
);
if
(
vis
!=
NULL
)
default_cx
=
glXCreateContext
(
display
,
vis
,
0
,
GL_TRUE
);
glXMakeCurrent
(
display
,
X11DRV_GetXRootWindow
(),
cx
);
if
(
default_cx
!=
NULL
)
glXMakeCurrent
(
display
,
X11DRV_GetXRootWindow
(),
default_cx
);
XFree
(
vis
);
LEAVE_GL
();
LEAVE_GL
();
if
(
default_cx
==
NULL
)
{
ERR
(
"Could not create default context.
\n
"
);
}
context_array
=
NULL
;
context_array
=
NULL
;
}
}
static
void
process_detach
(
void
)
{
glXDestroyContext
(
display
,
default_cx
);
}
/***********************************************************************
* OpenGL initialisation routine
*/
BOOL
WINAPI
OpenGL32_Init
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
static
int
process_count
;
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
if
(
!
process_count
++
)
process_attach
();
break
;
case
DLL_PROCESS_DETACH
:
if
(
!--
process_count
)
process_detach
();
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