Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mesa
piglit
Commits
96e4332f
Commit
96e4332f
authored
Feb 20, 2011
by
Marek Olšák
Browse files
draw-vertices: use the same stride for mixed buffers
parent
d265ad15
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/general/draw-vertices.c
View file @
96e4332f
...
@@ -409,10 +409,10 @@ static void test_interleaved_vertices(float x1, float y1, float x2, float y2, in
...
@@ -409,10 +409,10 @@ static void test_interleaved_vertices(float x1, float y1, float x2, float y2, in
static
void
test_mixed_user_and_vbo_buffers
(
float
x1
,
float
y1
,
float
x2
,
float
y2
,
int
index
)
static
void
test_mixed_user_and_vbo_buffers
(
float
x1
,
float
y1
,
float
x2
,
float
y2
,
int
index
)
{
{
float
v
2
[]
=
{
float
v
3
[]
=
{
x1
,
y1
,
x1
,
y1
,
0
,
x1
,
y2
,
x1
,
y2
,
0
,
x2
,
y1
x2
,
y1
,
0
};
};
float
c3
[]
=
{
float
c3
[]
=
{
0
,
0
,
1
,
0
,
0
,
1
,
...
@@ -425,9 +425,9 @@ static void test_mixed_user_and_vbo_buffers(float x1, float y1, float x2, float
...
@@ -425,9 +425,9 @@ static void test_mixed_user_and_vbo_buffers(float x1, float y1, float x2, float
if
(
!
index
)
{
if
(
!
index
)
{
glColorPointer
(
3
,
GL_FLOAT
,
0
,
c3
);
glColorPointer
(
3
,
GL_FLOAT
,
0
,
c3
);
vbo
=
vboVertexPointer
(
2
,
GL_FLOAT
,
0
,
v
2
,
sizeof
(
v
2
),
0
);
vbo
=
vboVertexPointer
(
3
,
GL_FLOAT
,
0
,
v
3
,
sizeof
(
v
3
),
0
);
}
else
{
}
else
{
glVertexPointer
(
2
,
GL_FLOAT
,
0
,
v
2
);
glVertexPointer
(
3
,
GL_FLOAT
,
0
,
v
3
);
vbo
=
vboColorPointer
(
3
,
GL_FLOAT
,
0
,
c3
,
sizeof
(
c3
),
0
);
vbo
=
vboColorPointer
(
3
,
GL_FLOAT
,
0
,
c3
,
sizeof
(
c3
),
0
);
}
}
...
...
Write
Preview
Supports
Markdown
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