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
b4090613
Commit
b4090613
authored
Dec 10, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make some constant arrays also static.
As pointed out by Dan Kegel.
parent
bcf0b4b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
drawprim.c
dlls/wined3d/drawprim.c
+8
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+6
-3
state.c
dlls/wined3d/state.c
+6
-6
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b4090613
...
...
@@ -1631,7 +1631,7 @@ static GLuint create_arb_blt_vertex_program(const WineD3D_GL_Info *gl_info)
static
GLuint
create_arb_blt_fragment_program
(
const
WineD3D_GL_Info
*
gl_info
,
enum
tex_types
tex_type
)
{
GLuint
program_id
=
0
;
const
char
*
blt_fprograms
[
tex_type_count
]
=
static
const
char
*
const
blt_fprograms
[
tex_type_count
]
=
{
/* tex_1d */
NULL
,
...
...
dlls/wined3d/drawprim.c
View file @
b4090613
...
...
@@ -1092,11 +1092,11 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
checkGLcall
(
"glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_FILLMODE
));
if
(
patch
->
has_normals
)
{
const
GLfloat
black
[
4
]
=
{
0
,
0
,
0
,
0
};
const
GLfloat
red
[
4
]
=
{
1
,
0
,
0
,
0
};
const
GLfloat
green
[
4
]
=
{
0
,
1
,
0
,
0
};
const
GLfloat
blue
[
4
]
=
{
0
,
0
,
1
,
0
};
const
GLfloat
white
[
4
]
=
{
1
,
1
,
1
,
1
};
static
const
GLfloat
black
[
]
=
{
0
,
0
,
0
,
0
};
static
const
GLfloat
red
[
]
=
{
1
,
0
,
0
,
0
};
static
const
GLfloat
green
[
]
=
{
0
,
1
,
0
,
0
};
static
const
GLfloat
blue
[
]
=
{
0
,
0
,
1
,
0
};
static
const
GLfloat
white
[
]
=
{
1
,
1
,
1
,
1
};
glEnable
(
GL_LIGHTING
);
checkGLcall
(
"glEnable(GL_LIGHTING)"
);
glLightModelfv
(
GL_LIGHT_MODEL_AMBIENT
,
black
);
...
...
@@ -1263,9 +1263,9 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
if
(
patch
->
has_normals
)
{
/* Now do the same with reverse light directions */
const
GLfloat
x
[
4
]
=
{
-
1
,
0
,
0
,
0
};
const
GLfloat
y
[
4
]
=
{
0
,
-
1
,
0
,
0
};
const
GLfloat
z
[
4
]
=
{
0
,
0
,
-
1
,
0
};
static
const
GLfloat
x
[
]
=
{
-
1
,
0
,
0
,
0
};
static
const
GLfloat
y
[
]
=
{
0
,
-
1
,
0
,
0
};
static
const
GLfloat
z
[
]
=
{
0
,
0
,
-
1
,
0
};
glLightfv
(
GL_LIGHT0
,
GL_POSITION
,
x
);
glLightfv
(
GL_LIGHT1
,
GL_POSITION
,
y
);
glLightfv
(
GL_LIGHT2
,
GL_POSITION
,
z
);
...
...
dlls/wined3d/glsl_shader.c
View file @
b4090613
...
...
@@ -96,7 +96,8 @@ static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj)
unsigned
int
i
;
BOOL
is_spam
;
const
char
*
spam
[]
=
{
static
const
char
*
const
spam
[]
=
{
"Vertex shader was successfully compiled to run on hardware.
\n
"
,
/* fglrx */
"Fragment shader was successfully compiled to run on hardware.
\n
"
,
/* fglrx */
"Fragment shader(s) linked, vertex shader(s) linked.
\n
"
,
/* fglrx, with \n */
...
...
@@ -3306,7 +3307,8 @@ static GLhandleARB create_glsl_blt_shader(const WineD3D_GL_Info *gl_info, enum t
{
GLhandleARB
program_id
;
GLhandleARB
vshader_id
,
pshader_id
;
const
char
*
blt_vshader
[]
=
{
static
const
char
*
blt_vshader
[]
=
{
"#version 120
\n
"
"void main(void)
\n
"
"{
\n
"
...
...
@@ -3316,7 +3318,8 @@ static GLhandleARB create_glsl_blt_shader(const WineD3D_GL_Info *gl_info, enum t
"}
\n
"
};
const
char
*
blt_pshaders
[
tex_type_count
]
=
{
static
const
char
*
blt_pshaders
[
tex_type_count
]
=
{
/* tex_1d */
NULL
,
/* tex_2d */
...
...
dlls/wined3d/state.c
View file @
b4090613
...
...
@@ -702,7 +702,7 @@ state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCon
checkGLcall
(
"glFinalCombinerInputNV()"
);
}
}
else
{
const
GLfloat
black
[
4
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
black
[
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
/* for the case of enabled lighting: */
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
&
black
[
0
]);
...
...
@@ -1323,7 +1323,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
device
->
updateStateBlock
->
material
.
Specular
);
checkGLcall
(
"glMaterialfv"
);
}
else
{
const
GLfloat
black
[
4
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
black
[
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
&
black
[
0
]);
checkGLcall
(
"glMaterialfv"
);
}
...
...
@@ -3175,10 +3175,10 @@ static void loadTexCoords(IWineD3DStateBlockImpl *stateblock, const WineDirect3D
static
void
tex_coordindex
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
DWORD
stage
=
(
state
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
WINED3D_HIGHEST_TEXTURE_STATE
;
DWORD
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
stage
];
const
GLfloat
s_plane
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
const
GLfloat
t_plane
[]
=
{
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
const
GLfloat
r_plane
[]
=
{
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
};
const
GLfloat
q_plane
[]
=
{
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
static
const
GLfloat
s_plane
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
static
const
GLfloat
t_plane
[]
=
{
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
static
const
GLfloat
r_plane
[]
=
{
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
};
static
const
GLfloat
q_plane
[]
=
{
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
if
(
mapped_stage
==
-
1
)
{
TRACE
(
"No texture unit mapped to stage %d. Skipping texture coordinates.
\n
"
,
stage
);
...
...
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