Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6244735f
Commit
6244735f
authored
Jul 27, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't crash when emulating GL_EXT_fogcoord.
parent
930d3e62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
gl_compat.c
dlls/wined3d/gl_compat.c
+16
-0
No files found.
dlls/wined3d/gl_compat.c
View file @
6244735f
...
...
@@ -264,6 +264,14 @@ static void (WINE_GLAPI *old_fogcoord_glColor4f) (GLfloat r, GLfloat g, GLfloat
static
void
WINE_GLAPI
wine_glVertex4f
(
GLfloat
x
,
GLfloat
y
,
GLfloat
z
,
GLfloat
w
)
{
struct
wined3d_context
*
ctx
=
context_get_current
();
/* This can be called from draw_test_quad() and at that point there is no
* wined3d_context current. */
if
(
!
ctx
)
{
old_fogcoord_glVertex4f
(
x
,
y
,
z
,
w
);
return
;
}
if
(
ctx
->
gl_fog_source
==
GL_FOG_COORDINATE_EXT
&&
ctx
->
fog_enabled
)
{
GLfloat
c
[
4
]
=
{
ctx
->
color
[
0
],
ctx
->
color
[
1
],
ctx
->
color
[
2
],
ctx
->
color
[
3
]};
GLfloat
i
;
...
...
@@ -294,6 +302,14 @@ static void WINE_GLAPI wine_glVertex3fv(const GLfloat *pos) {
static
void
WINE_GLAPI
wine_glColor4f
(
GLfloat
r
,
GLfloat
g
,
GLfloat
b
,
GLfloat
a
)
{
struct
wined3d_context
*
ctx
=
context_get_current
();
/* This can be called from draw_test_quad() and at that point there is no
* wined3d_context current. */
if
(
!
ctx
)
{
old_fogcoord_glColor4f
(
r
,
g
,
b
,
a
);
return
;
}
ctx
->
color
[
0
]
=
r
;
ctx
->
color
[
1
]
=
g
;
ctx
->
color
[
2
]
=
b
;
...
...
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