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
4e531401
Commit
4e531401
authored
Dec 19, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DTSS_TEXCOORDINDEX to the state table.
parent
bd6a6ad2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
139 deletions
+1
-139
device.c
dlls/wined3d/device.c
+1
-139
state.c
dlls/wined3d/state.c
+0
-0
No files found.
dlls/wined3d/device.c
View file @
4e531401
...
...
@@ -4309,145 +4309,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
#endif
case
WINED3DTSS_TEXCOORDINDEX
:
{
/* Values 0-7 are indexes into the FVF tex coords - See comments in DrawPrimitive */
/* FIXME: From MSDN: The WINED3DTSS_TCI_* flags are mutually exclusive. If you include
one flag, you can still specify an index value, which the system uses to
determine the texture wrapping mode.
eg. SetTextureStageState( 0, WINED3DTSS_TEXCOORDINDEX, WINED3DTSS_TCI_CAMERASPACEPOSITION | 1 );
means use the vertex position (camera-space) as the input texture coordinates
for this texture stage, and the wrap mode set in the WINED3DRS_WRAP1 render
state. We do not (yet) support the WINED3DRENDERSTATE_WRAPx values, nor tie them up
to the TEXCOORDINDEX value */
/**
* Be careful the value of the mask 0xF0000 come from d3d8types.h infos
*/
switch
(
Value
&
0xFFFF0000
)
{
case
WINED3DTSS_TCI_PASSTHRU
:
/*Use the specified texture coordinates contained within the vertex format. This value resolves to zero.*/
glDisable
(
GL_TEXTURE_GEN_S
);
glDisable
(
GL_TEXTURE_GEN_T
);
glDisable
(
GL_TEXTURE_GEN_R
);
glDisable
(
GL_TEXTURE_GEN_Q
);
checkGLcall
(
"glDisable(GL_TEXTURE_GEN_S,T,R,Q)"
);
break
;
case
WINED3DTSS_TCI_CAMERASPACEPOSITION
:
/* CameraSpacePosition means use the vertex position, transformed to camera space,
as the input texture coordinates for this stage's texture transformation. This
equates roughly to EYE_LINEAR */
{
float
s_plane
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
t_plane
[]
=
{
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
float
r_plane
[]
=
{
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
};
float
q_plane
[]
=
{
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
TRACE
(
"WINED3DTSS_TCI_CAMERASPACEPOSITION - Set eye plane
\n
"
);
glMatrixMode
(
GL_MODELVIEW
);
glPushMatrix
();
glLoadIdentity
();
glTexGenfv
(
GL_S
,
GL_EYE_PLANE
,
s_plane
);
glTexGenfv
(
GL_T
,
GL_EYE_PLANE
,
t_plane
);
glTexGenfv
(
GL_R
,
GL_EYE_PLANE
,
r_plane
);
glTexGenfv
(
GL_Q
,
GL_EYE_PLANE
,
q_plane
);
glPopMatrix
();
TRACE
(
"WINED3DTSS_TCI_CAMERASPACEPOSITION - Set GL_TEXTURE_GEN_x and GL_x, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR
\n
"
);
glEnable
(
GL_TEXTURE_GEN_S
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_S);"
);
glTexGeni
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
GL_EYE_LINEAR
);
checkGLcall
(
"glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)"
);
glEnable
(
GL_TEXTURE_GEN_T
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_T);"
);
glTexGeni
(
GL_T
,
GL_TEXTURE_GEN_MODE
,
GL_EYE_LINEAR
);
checkGLcall
(
"glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)"
);
glEnable
(
GL_TEXTURE_GEN_R
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_R);"
);
glTexGeni
(
GL_R
,
GL_TEXTURE_GEN_MODE
,
GL_EYE_LINEAR
);
checkGLcall
(
"glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)"
);
}
break
;
case
WINED3DTSS_TCI_CAMERASPACENORMAL
:
{
if
(
GL_SUPPORT
(
NV_TEXGEN_REFLECTION
))
{
float
s_plane
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
t_plane
[]
=
{
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
float
r_plane
[]
=
{
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
};
float
q_plane
[]
=
{
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
TRACE
(
"WINED3DTSS_TCI_CAMERASPACENORMAL - Set eye plane
\n
"
);
glMatrixMode
(
GL_MODELVIEW
);
glPushMatrix
();
glLoadIdentity
();
glTexGenfv
(
GL_S
,
GL_EYE_PLANE
,
s_plane
);
glTexGenfv
(
GL_T
,
GL_EYE_PLANE
,
t_plane
);
glTexGenfv
(
GL_R
,
GL_EYE_PLANE
,
r_plane
);
glTexGenfv
(
GL_Q
,
GL_EYE_PLANE
,
q_plane
);
glPopMatrix
();
glEnable
(
GL_TEXTURE_GEN_S
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_S);"
);
glTexGeni
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
GL_NORMAL_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)"
);
glEnable
(
GL_TEXTURE_GEN_T
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_T);"
);
glTexGeni
(
GL_T
,
GL_TEXTURE_GEN_MODE
,
GL_NORMAL_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)"
);
glEnable
(
GL_TEXTURE_GEN_R
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_R);"
);
glTexGeni
(
GL_R
,
GL_TEXTURE_GEN_MODE
,
GL_NORMAL_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)"
);
}
}
break
;
case
WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR
:
{
if
(
GL_SUPPORT
(
NV_TEXGEN_REFLECTION
))
{
float
s_plane
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
t_plane
[]
=
{
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
float
r_plane
[]
=
{
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
};
float
q_plane
[]
=
{
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
TRACE
(
"WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Set eye plane
\n
"
);
glMatrixMode
(
GL_MODELVIEW
);
glPushMatrix
();
glLoadIdentity
();
glTexGenfv
(
GL_S
,
GL_EYE_PLANE
,
s_plane
);
glTexGenfv
(
GL_T
,
GL_EYE_PLANE
,
t_plane
);
glTexGenfv
(
GL_R
,
GL_EYE_PLANE
,
r_plane
);
glTexGenfv
(
GL_Q
,
GL_EYE_PLANE
,
q_plane
);
glPopMatrix
();
glEnable
(
GL_TEXTURE_GEN_S
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_S);"
);
glTexGeni
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
GL_REFLECTION_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)"
);
glEnable
(
GL_TEXTURE_GEN_T
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_T);"
);
glTexGeni
(
GL_T
,
GL_TEXTURE_GEN_MODE
,
GL_REFLECTION_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)"
);
glEnable
(
GL_TEXTURE_GEN_R
);
checkGLcall
(
"glEnable(GL_TEXTURE_GEN_R);"
);
glTexGeni
(
GL_R
,
GL_TEXTURE_GEN_MODE
,
GL_REFLECTION_MAP_NV
);
checkGLcall
(
"glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)"
);
}
}
break
;
/* Unhandled types: */
default:
/* Todo: */
/* ? disable GL_TEXTURE_GEN_n ? */
glDisable
(
GL_TEXTURE_GEN_S
);
glDisable
(
GL_TEXTURE_GEN_T
);
glDisable
(
GL_TEXTURE_GEN_R
);
glDisable
(
GL_TEXTURE_GEN_Q
);
FIXME
(
"Unhandled WINED3DTSS_TEXCOORDINDEX %x
\n
"
,
Value
);
break
;
}
/* Handled from the state table */
}
break
;
...
...
dlls/wined3d/state.c
View file @
4e531401
This diff is collapsed.
Click to expand it.
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