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
50e2ee73
Commit
50e2ee73
authored
Sep 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename wined3d_fake_gl_ctx to wined3d_caps_gl_ctx.
There's nothing particularly fake about the GL context.
parent
36dcb77f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
directx.c
dlls/wined3d/directx.c
+19
-19
No files found.
dlls/wined3d/directx.c
View file @
50e2ee73
...
...
@@ -255,7 +255,7 @@ const GLenum magLookup_noFilter[] =
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
,
};
struct
wined3d_
fake
_gl_ctx
struct
wined3d_
caps
_gl_ctx
{
HDC
dc
;
HWND
wnd
;
...
...
@@ -264,12 +264,12 @@ struct wined3d_fake_gl_ctx
HGLRC
restore_gl_ctx
;
};
static
void
WineD3D_ReleaseFakeGLContext
(
const
struct
wined3d_fake
_gl_ctx
*
ctx
)
static
void
wined3d_caps_gl_ctx_destroy
(
const
struct
wined3d_caps
_gl_ctx
*
ctx
)
{
TRACE
(
"Destroying
fake
GL context.
\n
"
);
TRACE
(
"Destroying
caps
GL context.
\n
"
);
if
(
!
wglMakeCurrent
(
NULL
,
NULL
))
ERR
(
"Failed to disable
fake
GL context.
\n
"
);
ERR
(
"Failed to disable
caps
GL context.
\n
"
);
if
(
!
wglDeleteContext
(
ctx
->
gl_ctx
))
{
...
...
@@ -284,7 +284,7 @@ static void WineD3D_ReleaseFakeGLContext(const struct wined3d_fake_gl_ctx *ctx)
ERR
(
"Failed to restore previous GL context.
\n
"
);
}
static
void
wined3d_c
reate_fake_gl_context_attribs
(
struct
wined3d_fake_gl_ctx
*
fake
_gl_ctx
,
static
void
wined3d_c
aps_gl_ctx_create_attribs
(
struct
wined3d_caps_gl_ctx
*
caps
_gl_ctx
,
struct
wined3d_gl_info
*
gl_info
,
const
GLint
*
ctx_attribs
)
{
HGLRC
new_ctx
;
...
...
@@ -292,14 +292,14 @@ static void wined3d_create_fake_gl_context_attribs(struct wined3d_fake_gl_ctx *f
if
(
!
(
gl_info
->
p_wglCreateContextAttribsARB
=
(
void
*
)
wglGetProcAddress
(
"wglCreateContextAttribsARB"
)))
return
;
if
(
!
(
new_ctx
=
gl_info
->
p_wglCreateContextAttribsARB
(
fake
_gl_ctx
->
dc
,
NULL
,
ctx_attribs
)))
if
(
!
(
new_ctx
=
gl_info
->
p_wglCreateContextAttribsARB
(
caps
_gl_ctx
->
dc
,
NULL
,
ctx_attribs
)))
{
ERR
(
"Failed to create a context using wglCreateContextAttribsARB(), last error %#x.
\n
"
,
GetLastError
());
gl_info
->
p_wglCreateContextAttribsARB
=
NULL
;
return
;
}
if
(
!
wglMakeCurrent
(
fake
_gl_ctx
->
dc
,
new_ctx
))
if
(
!
wglMakeCurrent
(
caps
_gl_ctx
->
dc
,
new_ctx
))
{
ERR
(
"Failed to make new context current, last error %#x.
\n
"
,
GetLastError
());
if
(
!
wglDeleteContext
(
new_ctx
))
...
...
@@ -308,12 +308,12 @@ static void wined3d_create_fake_gl_context_attribs(struct wined3d_fake_gl_ctx *f
return
;
}
if
(
!
wglDeleteContext
(
fake
_gl_ctx
->
gl_ctx
))
if
(
!
wglDeleteContext
(
caps
_gl_ctx
->
gl_ctx
))
ERR
(
"Failed to delete old context, last error %#x.
\n
"
,
GetLastError
());
fake
_gl_ctx
->
gl_ctx
=
new_ctx
;
caps
_gl_ctx
->
gl_ctx
=
new_ctx
;
}
static
BOOL
WineD3D_CreateFakeGLContext
(
struct
wined3d_fake
_gl_ctx
*
ctx
)
static
BOOL
wined3d_caps_gl_ctx_create
(
struct
wined3d_caps
_gl_ctx
*
ctx
)
{
PIXELFORMATDESCRIPTOR
pfd
;
int
iPixelFormat
;
...
...
@@ -367,7 +367,7 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
/* Make it the current GL context. */
if
(
!
wglMakeCurrent
(
ctx
->
dc
,
ctx
->
gl_ctx
))
{
ERR
(
"Failed to make
fake
GL context current.
\n
"
);
ERR
(
"Failed to make
caps
GL context current.
\n
"
);
goto
fail
;
}
...
...
@@ -5033,7 +5033,7 @@ static void wined3d_adapter_init_fb_cfgs(struct wined3d_adapter *adapter, HDC dc
static
BOOL
wined3d_adapter_init
(
struct
wined3d_adapter
*
adapter
,
UINT
ordinal
)
{
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
struct
wined3d_
fake_gl_ctx
fake
_gl_ctx
=
{
0
};
struct
wined3d_
caps_gl_ctx
caps
_gl_ctx
=
{
0
};
unsigned
int
ctx_attrib_idx
=
0
;
DISPLAY_DEVICEW
display_device
;
GLint
ctx_attribs
[
3
];
...
...
@@ -5076,7 +5076,7 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal)
TRACE
(
"Allocated LUID %08x:%08x for adapter %p.
\n
"
,
adapter
->
luid
.
HighPart
,
adapter
->
luid
.
LowPart
,
adapter
);
if
(
!
WineD3D_CreateFakeGLContext
(
&
fake
_gl_ctx
))
if
(
!
wined3d_caps_gl_ctx_create
(
&
caps
_gl_ctx
))
{
ERR
(
"Failed to get a GL context for adapter %p.
\n
"
,
adapter
);
return
FALSE
;
...
...
@@ -5088,22 +5088,22 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal)
ctx_attribs
[
ctx_attrib_idx
++
]
=
WGL_CONTEXT_DEBUG_BIT_ARB
;
}
ctx_attribs
[
ctx_attrib_idx
]
=
0
;
wined3d_c
reate_fake_gl_context_attribs
(
&
fake
_gl_ctx
,
gl_info
,
ctx_attribs
);
wined3d_c
aps_gl_ctx_create_attribs
(
&
caps
_gl_ctx
,
gl_info
,
ctx_attribs
);
if
(
!
wined3d_adapter_init_gl_caps
(
adapter
))
{
ERR
(
"Failed to initialize GL caps for adapter %p.
\n
"
,
adapter
);
WineD3D_ReleaseFakeGLContext
(
&
fake
_gl_ctx
);
wined3d_caps_gl_ctx_destroy
(
&
caps
_gl_ctx
);
return
FALSE
;
}
wined3d_adapter_init_fb_cfgs
(
adapter
,
fake
_gl_ctx
.
dc
);
wined3d_adapter_init_fb_cfgs
(
adapter
,
caps
_gl_ctx
.
dc
);
/* We haven't found any suitable formats. This should only happen in
* case of GDI software rendering, which is pretty useless anyway. */
if
(
!
adapter
->
cfg_count
)
{
WARN
(
"No suitable pixel formats found.
\n
"
);
WineD3D_ReleaseFakeGLContext
(
&
fake
_gl_ctx
);
wined3d_caps_gl_ctx_destroy
(
&
caps
_gl_ctx
);
HeapFree
(
GetProcessHeap
(),
0
,
adapter
->
cfgs
);
return
FALSE
;
}
...
...
@@ -5111,7 +5111,7 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal)
if
(
!
wined3d_adapter_init_format_info
(
adapter
))
{
ERR
(
"Failed to initialize GL format info.
\n
"
);
WineD3D_ReleaseFakeGLContext
(
&
fake
_gl_ctx
);
wined3d_caps_gl_ctx_destroy
(
&
caps
_gl_ctx
);
HeapFree
(
GetProcessHeap
(),
0
,
adapter
->
cfgs
);
return
FALSE
;
}
...
...
@@ -5125,7 +5125,7 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal)
TRACE
(
"DeviceName: %s
\n
"
,
debugstr_w
(
display_device
.
DeviceName
));
strcpyW
(
adapter
->
DeviceName
,
display_device
.
DeviceName
);
WineD3D_ReleaseFakeGLContext
(
&
fake
_gl_ctx
);
wined3d_caps_gl_ctx_destroy
(
&
caps
_gl_ctx
);
wined3d_adapter_init_ffp_attrib_ops
(
adapter
);
...
...
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