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
045975b1
Commit
045975b1
authored
Dec 28, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Dec 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Where possible, avoid using D3DCOLORTOGLFLOAT4.
parent
fd21610c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
basetexture.c
dlls/wined3d/basetexture.c
+3
-3
device.c
dlls/wined3d/device.c
+3
-3
state.c
dlls/wined3d/state.c
+11
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-0
No files found.
dlls/wined3d/basetexture.c
View file @
045975b1
...
...
@@ -363,11 +363,11 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
break
;
case
WINED3DSAMP_BORDERCOLOR
:
{
floa
t
col
[
4
];
GLin
t
col
[
4
];
*
state
=
samplerStates
[
textureObjectSamplerStates
[
i
].
state
];
D3DCOLORTOGL
FLOA
T4
(
*
state
,
col
);
D3DCOLORTOGL
IN
T4
(
*
state
,
col
);
TRACE
(
"Setting border color for %u to %x
\n
"
,
textureDimensions
,
*
state
);
glTexParameter
f
v
(
textureDimensions
,
GL_TEXTURE_BORDER_COLOR
,
&
col
[
0
]);
glTexParameter
i
v
(
textureDimensions
,
GL_TEXTURE_BORDER_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexParameteri(..., GL_TEXTURE_BORDER_COLOR, ...)"
);
}
break
;
...
...
dlls/wined3d/device.c
View file @
045975b1
...
...
@@ -438,7 +438,7 @@ static void delete_glsl_shader_list(IWineD3DDevice* iface) {
/* Apply the current values to the specified texture stage */
static
void
WINAPI
IWineD3DDeviceImpl_SetupTextureStates
(
IWineD3DDevice
*
iface
,
DWORD
Sampler
,
DWORD
texture_idx
,
DWORD
Flags
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
floa
t
col
[
4
];
GLin
t
col
[
4
];
union
{
float
f
;
...
...
@@ -503,8 +503,8 @@ static void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface,
checkGLcall
(
"glTexEnvi GL_TEXTURE_LOD_BIAS_EXT ..."
);
}
D3DCOLORTOGL
FLOA
T4
(
This
->
stateBlock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
glTexEnv
f
v
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
D3DCOLORTOGL
IN
T4
(
This
->
stateBlock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
glTexEnv
i
v
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color);"
);
/* TODO: NV_POINT_SPRITE */
...
...
dlls/wined3d/state.c
View file @
045975b1
...
...
@@ -197,11 +197,11 @@ static void state_zfunc(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
static
void
state_ambient
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
floa
t
col
[
4
];
D3DCOLORTOGL
FLOA
T4
(
stateblock
->
renderState
[
WINED3DRS_AMBIENT
],
col
);
GLin
t
col
[
4
];
D3DCOLORTOGL
IN
T4
(
stateblock
->
renderState
[
WINED3DRS_AMBIENT
],
col
);
TRACE
(
"Setting ambient to (%
f,%f,%f,%f
)
\n
"
,
col
[
0
],
col
[
1
],
col
[
2
],
col
[
3
]);
glLightModel
f
v
(
GL_LIGHT_MODEL_AMBIENT
,
col
);
TRACE
(
"Setting ambient to (%
d,%d,%d,%d
)
\n
"
,
col
[
0
],
col
[
1
],
col
[
2
],
col
[
3
]);
glLightModel
i
v
(
GL_LIGHT_MODEL_AMBIENT
,
col
);
checkGLcall
(
"glLightModel for MODEL_AMBIENT"
);
}
...
...
@@ -499,8 +499,8 @@ static void state_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock) {
/* Note the texture color applies to all textures whereas
* GL_TEXTURE_ENV_COLOR applies to active only
*/
floa
t
col
[
4
];
D3DCOLORTOGL
FLOA
T4
(
stateblock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
GLin
t
col
[
4
];
D3DCOLORTOGL
IN
T4
(
stateblock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
if
(
!
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
/* And now the default texture color as well */
...
...
@@ -515,11 +515,11 @@ static void state_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock) {
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
}
glTexEnv
f
v
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
glTexEnv
i
v
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color);"
);
}
}
else
{
GL_EXTCALL
(
glCombinerParameter
f
vNV
(
GL_CONSTANT_COLOR0_NV
,
&
col
[
0
]));
GL_EXTCALL
(
glCombinerParameter
i
vNV
(
GL_CONSTANT_COLOR0_NV
,
&
col
[
0
]));
}
}
...
...
@@ -786,10 +786,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
static
void
state_fogcolor
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
floa
t
col
[
4
];
D3DCOLORTOGL
FLOA
T4
(
stateblock
->
renderState
[
WINED3DRS_FOGCOLOR
],
col
);
GLin
t
col
[
4
];
D3DCOLORTOGL
IN
T4
(
stateblock
->
renderState
[
WINED3DRS_FOGCOLOR
],
col
);
/* Set the default alpha blend color */
glFog
f
v
(
GL_FOG_COLOR
,
&
col
[
0
]);
glFog
i
v
(
GL_FOG_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glFog GL_FOG_COLOR"
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
045975b1
...
...
@@ -228,6 +228,12 @@ extern int num_lock;
(vec)[2] = D3DCOLOR_B(dw); \
(vec)[3] = D3DCOLOR_A(dw);
#define D3DCOLORTOGLINT4(src, dst) \
(dst)[0] = D3DCOLOR_B_R(src); \
(dst)[1] = D3DCOLOR_B_G(src); \
(dst)[2] = D3DCOLOR_B_B(src); \
(dst)[3] = D3DCOLOR_B_A(src);
/* DirectX Device Limits */
/* --------------------- */
#define MAX_LEVELS 256
/* Maximum number of mipmap levels. Guessed at 256 */
...
...
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