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
287c6247
Commit
287c6247
authored
Dec 08, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DRS_TEXTUREFACTOR to the state table.
parent
ac26172c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
device.c
dlls/wined3d/device.c
+1
-28
state.c
dlls/wined3d/state.c
+29
-1
No files found.
dlls/wined3d/device.c
View file @
287c6247
...
...
@@ -3460,35 +3460,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_CLIPPLANEENABLE
:
case
WINED3DRS_CLIPPING
:
case
WINED3DRS_BLENDOP
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_TEXTUREFACTOR
:
{
unsigned
int
i
;
/* Note the texture color applies to all textures whereas
GL_TEXTURE_ENV_COLOR applies to active only */
float
col
[
4
];
D3DCOLORTOGLFLOAT4
(
Value
,
col
);
if
(
!
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
/* And now the default texture color as well */
for
(
i
=
0
;
i
<
GL_LIMITS
(
texture_stages
);
i
++
)
{
/* Note the WINED3DRS value applies to all textures, but GL has one
per texture, so apply it now ready to be used! */
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
i
));
checkGLcall
(
"glActiveTextureARB"
);
}
else
if
(
i
>
0
)
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
}
glTexEnvfv
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color);"
);
}
}
}
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_SPECULARENABLE
:
...
...
dlls/wined3d/state.c
View file @
287c6247
...
...
@@ -432,6 +432,34 @@ static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock) {
checkGLcall
(
"glBlendEquation"
);
}
static
void
state_texfactor
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
unsigned
int
i
;
/* Note the texture color applies to all textures whereas
* GL_TEXTURE_ENV_COLOR applies to active only
*/
float
col
[
4
];
D3DCOLORTOGLFLOAT4
(
stateblock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
if
(
!
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
/* And now the default texture color as well */
for
(
i
=
0
;
i
<
GL_LIMITS
(
texture_stages
);
i
++
)
{
/* Note the WINED3DRS value applies to all textures, but GL has one
* per texture, so apply it now ready to be used!
*/
if
(
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
i
));
checkGLcall
(
"glActiveTextureARB"
);
}
else
if
(
i
>
0
)
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
}
glTexEnvfv
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color);"
);
}
}
}
const
struct
StateEntry
StateTable
[]
=
{
/* State name representative, apply function */
...
...
@@ -495,7 +523,7 @@ const struct StateEntry StateTable[] =
{
/* 57, WINED3DRS_STENCILREF */
STATE_RENDER
(
WINED3DRS_STENCILENABLE
),
state_unknown
},
{
/* 58, WINED3DRS_STENCILMASK */
STATE_RENDER
(
WINED3DRS_STENCILENABLE
),
state_unknown
},
{
/* 59, WINED3DRS_STENCILWRITEMASK */
STATE_RENDER
(
WINED3DRS_STENCILWRITEMASK
),
state_unknown
},
{
/* 60, WINED3DRS_TEXTUREFACTOR */
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
state_
unknown
},
{
/* 60, WINED3DRS_TEXTUREFACTOR */
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
state_
texfactor
},
/* A BIG hole. If wanted, 'fixed' states like the vertex type or the bound shaders can be put here */
{
/* 61, Undefined */
0
,
state_undefined
},
{
/* 62, Undefined */
0
,
state_undefined
},
...
...
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