Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
e48350a4
Commit
e48350a4
authored
Aug 24, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly check if an attribute is used in loadVertexData().
parent
918c9d59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
state.c
dlls/wined3d/state.c
+15
-16
No files found.
dlls/wined3d/state.c
View file @
e48350a4
...
@@ -4144,11 +4144,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4144,11 +4144,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
stateblock
->
wineD3DDevice
->
instancedDraw
=
FALSE
;
stateblock
->
wineD3DDevice
->
instancedDraw
=
FALSE
;
/* Blend Data ---------------------------------------------- */
/* Blend Data ---------------------------------------------- */
e
=
&
si
->
elements
[
WINED3D_FFP_BLENDWEIGHT
];
if
((
si
->
use_map
&
(
1
<<
WINED3D_FFP_BLENDWEIGHT
))
if
(
e
->
data
||
e
->
buffer_object
||
si
->
use_map
&
(
1
<<
WINED3D_FFP_BLENDINDICES
))
||
si
->
elements
[
WINED3D_FFP_BLENDINDICES
].
data
||
si
->
elements
[
WINED3D_FFP_BLENDINDICES
].
buffer_object
)
{
{
e
=
&
si
->
elements
[
WINED3D_FFP_BLENDWEIGHT
];
if
(
GL_SUPPORT
(
ARB_VERTEX_BLEND
))
{
if
(
GL_SUPPORT
(
ARB_VERTEX_BLEND
))
{
TRACE
(
"Blend %d %p %d
\n
"
,
e
->
format_desc
->
component_count
,
TRACE
(
"Blend %d %p %d
\n
"
,
e
->
format_desc
->
component_count
,
e
->
data
+
stateblock
->
loadBaseVertexIndex
*
e
->
stride
,
e
->
stride
+
offset
[
e
->
stream_idx
]);
e
->
data
+
stateblock
->
loadBaseVertexIndex
*
e
->
stride
,
e
->
stride
+
offset
[
e
->
stream_idx
]);
...
@@ -4175,8 +4175,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4175,8 +4175,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
checkGLcall
(
"glWeightPointerARB"
);
checkGLcall
(
"glWeightPointerARB"
);
if
(
si
->
elements
[
WINED3D_FFP_BLENDINDICES
].
data
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_BLENDINDICES
))
||
(
si
->
elements
[
WINED3D_FFP_BLENDINDICES
].
buffer_object
))
{
{
static
BOOL
warned
;
static
BOOL
warned
;
if
(
!
warned
)
if
(
!
warned
)
...
@@ -4200,8 +4199,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4200,8 +4199,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
}
}
/* Point Size ----------------------------------------------*/
/* Point Size ----------------------------------------------*/
e
=
&
si
->
elements
[
WINED3D_FFP_PSIZE
];
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_PSIZE
))
if
(
e
->
data
||
e
->
buffer_object
)
{
{
/* no such functionality in the fixed function GL pipeline */
/* no such functionality in the fixed function GL pipeline */
TRACE
(
"Cannot change ptSize here in openGl
\n
"
);
TRACE
(
"Cannot change ptSize here in openGl
\n
"
);
...
@@ -4209,11 +4207,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4209,11 +4207,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
}
}
/* Vertex Pointers -----------------------------------------*/
/* Vertex Pointers -----------------------------------------*/
e
=
&
si
->
elements
[
WINED3D_FFP_POSITION
];
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_POSITION
))
if
(
e
->
data
||
e
->
buffer_object
)
{
{
VTRACE
((
"glVertexPointer(%d, GL_FLOAT, %d, %p)
\n
"
,
e
->
stride
,
e
->
size
,
e
->
data
));
VTRACE
((
"glVertexPointer(%d, GL_FLOAT, %d, %p)
\n
"
,
e
->
stride
,
e
->
size
,
e
->
data
));
e
=
&
si
->
elements
[
WINED3D_FFP_POSITION
];
if
(
curVBO
!=
e
->
buffer_object
)
if
(
curVBO
!=
e
->
buffer_object
)
{
{
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
...
@@ -4243,10 +4241,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4243,10 +4241,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
}
}
/* Normals -------------------------------------------------*/
/* Normals -------------------------------------------------*/
e
=
&
si
->
elements
[
WINED3D_FFP_NORMAL
];
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_NORMAL
))
if
(
e
->
data
||
e
->
buffer_object
)
{
{
VTRACE
((
"glNormalPointer(GL_FLOAT, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
VTRACE
((
"glNormalPointer(GL_FLOAT, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
e
=
&
si
->
elements
[
WINED3D_FFP_NORMAL
];
if
(
curVBO
!=
e
->
buffer_object
)
if
(
curVBO
!=
e
->
buffer_object
)
{
{
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
...
@@ -4273,11 +4272,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4273,11 +4272,11 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
/* NOTE: Unless we write a vertex shader to swizzle the colour*/
/* NOTE: Unless we write a vertex shader to swizzle the colour*/
/* , or the user doesn't care and wants the speed advantage */
/* , or the user doesn't care and wants the speed advantage */
e
=
&
si
->
elements
[
WINED3D_FFP_DIFFUSE
];
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_DIFFUSE
))
if
(
e
->
data
||
e
->
buffer_object
)
{
{
VTRACE
((
"glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
VTRACE
((
"glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
e
=
&
si
->
elements
[
WINED3D_FFP_DIFFUSE
];
if
(
curVBO
!=
e
->
buffer_object
)
if
(
curVBO
!=
e
->
buffer_object
)
{
{
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
e
->
buffer_object
));
...
@@ -4297,12 +4296,12 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4297,12 +4296,12 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
}
}
/* Specular Colour ------------------------------------------*/
/* Specular Colour ------------------------------------------*/
e
=
&
si
->
elements
[
WINED3D_FFP_SPECULAR
];
if
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_SPECULAR
))
if
(
e
->
data
||
e
->
buffer_object
)
{
{
TRACE
(
"setting specular colour
\n
"
);
TRACE
(
"setting specular colour
\n
"
);
VTRACE
((
"glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
VTRACE
((
"glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)
\n
"
,
e
->
stride
,
e
->
data
));
e
=
&
si
->
elements
[
WINED3D_FFP_SPECULAR
];
if
(
GL_SUPPORT
(
EXT_SECONDARY_COLOR
))
{
if
(
GL_SUPPORT
(
EXT_SECONDARY_COLOR
))
{
GLenum
type
=
e
->
format_desc
->
gl_vtx_type
;
GLenum
type
=
e
->
format_desc
->
gl_vtx_type
;
GLint
format
=
e
->
format_desc
->
gl_vtx_format
;
GLint
format
=
e
->
format_desc
->
gl_vtx_format
;
...
...
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