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
79ca4e02
Commit
79ca4e02
authored
May 09, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
May 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Load texture coordinates even if no texture is bound to that stage at this time.
parent
cde60c0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
34 deletions
+29
-34
state.c
dlls/wined3d/state.c
+29
-34
No files found.
dlls/wined3d/state.c
View file @
79ca4e02
...
...
@@ -1825,46 +1825,41 @@ static void loadTexCoords(IWineD3DStateBlockImpl *stateblock, WineDirect3DVertex
unsigned
int
mapped_stage
=
0
;
unsigned
int
textureNo
=
0
;
/* The code below uses glClientActiveTexture and glMultiTexCoord* which are all part of the GL_ARB_multitexture extension. */
/* Abort if we don't support the extension. */
if
(
!
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
return
;
}
for
(
textureNo
=
0
;
textureNo
<
GL_LIMITS
(
texture_stages
);
++
textureNo
)
{
/* The code below uses glClientActiveTexture and glMultiTexCoord* which are all part of the GL_ARB_multitexture extension. */
/* Abort if we don't support the extension. */
if
(
!
GL_SUPPORT
(
ARB_MULTITEXTURE
))
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
continue
;
}
int
coordIdx
=
stateblock
->
textureState
[
textureNo
][
WINED3DTSS_TEXCOORDINDEX
];
if
(
stateblock
->
textures
[
textureNo
])
{
int
coordIdx
=
stateblock
->
textureState
[
textureNo
][
WINED3DTSS_TEXCOORDINDEX
];
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
textureNo
];
if
(
mapped_stage
==
-
1
)
continue
;
if
(
coordIdx
<
MAX_TEXTURES
&&
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
||
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
))
{
TRACE
(
"Setting up texture %u, idx %d, cordindx %u, data %p
\n
"
,
textureNo
,
mapped_stage
,
coordIdx
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
);
if
(
*
curVBO
!=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
));
checkGLcall
(
"glBindBufferARB"
);
*
curVBO
=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
;
}
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
textureNo
];
/* The gl texture unit will never be -1 for a bound texture */
GL_EXTCALL
(
glClientActiveTextureARB
(
GL_TEXTURE0_ARB
+
mapped_stage
));
checkGLcall
(
"glClientActiveTextureARB"
);
if
(
coordIdx
>=
MAX_TEXTURES
)
{
VTRACE
((
"tex: %d - Skip tex coords, as being system generated
\n
"
,
textureNo
));
GL_EXTCALL
(
glMultiTexCoord4fARB
(
GL_TEXTURE0_ARB
+
mapped_stage
,
0
,
0
,
0
,
1
));
}
else
if
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
==
NULL
&&
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
==
0
)
{
VTRACE
((
"Bound texture but no texture coordinates supplied, so skipping
\n
"
));
GL_EXTCALL
(
glMultiTexCoord4fARB
(
GL_TEXTURE0_ARB
+
mapped_stage
,
0
,
0
,
0
,
1
));
}
else
{
TRACE
(
"Setting up texture %u, idx %d, cordindx %u, data %p
\n
"
,
textureNo
,
mapped_stage
,
coordIdx
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
);
if
(
*
curVBO
!=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
));
checkGLcall
(
"glBindBufferARB"
);
*
curVBO
=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
VBO
;
}
/* The coords to supply depend completely on the fvf / vertex shader */
glTexCoordPointer
(
WINED3D_ATR_SIZE
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
),
WINED3D_ATR_GLTYPE
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
),
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwStride
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
+
stateblock
->
loadBaseVertexIndex
*
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwStride
+
offset
[
sd
->
u
.
s
.
texCoords
[
coordIdx
].
streamNo
]);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
}
}
else
if
(
!
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
GL_EXTCALL
(
glMultiTexCoord4fARB
(
GL_TEXTURE0_ARB
+
textureNo
,
0
,
0
,
0
,
1
));
/* The coords to supply depend completely on the fvf / vertex shader */
glTexCoordPointer
(
WINED3D_ATR_SIZE
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
),
WINED3D_ATR_GLTYPE
(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
),
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwStride
,
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
+
stateblock
->
loadBaseVertexIndex
*
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwStride
+
offset
[
sd
->
u
.
s
.
texCoords
[
coordIdx
].
streamNo
]);
glEnableClientState
(
GL_TEXTURE_COORD_ARRAY
);
}
else
{
GL_EXTCALL
(
glMultiTexCoord4fARB
(
GL_TEXTURE0_ARB
+
mapped_stage
,
0
,
0
,
0
,
1
));
}
}
if
(
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
...
...
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