Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
d990f8e2
Commit
d990f8e2
authored
Oct 18, 2013
by
Geoff Lang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for NULL buffer data.
TRAC #23776 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
parent
e8a1f78c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
BufferDataNULLTest.cpp
tests/angle_tests/BufferDataNULLTest.cpp
+41
-0
No files found.
tests/angle_tests/BufferDataNULLTest.cpp
0 → 100644
View file @
d990f8e2
#include "ANGLETest.h"
class
BufferDataNULLTest
:
public
ANGLETest
{
protected
:
BufferDataNULLTest
()
{
setWindowWidth
(
1
);
setWindowHeight
(
1
);
}
};
TEST_F
(
BufferDataNULLTest
,
null_data
)
{
GLuint
buf
;
glGenBuffers
(
1
,
&
buf
);
ASSERT_NE
(
buf
,
0U
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
buf
);
EXPECT_GL_NO_ERROR
();
const
int
numIterations
=
128
;
for
(
int
i
=
0
;
i
<
numIterations
;
++
i
)
{
GLsizei
bufferSize
=
sizeof
(
GLfloat
)
*
(
i
+
1
);
glBufferData
(
GL_ARRAY_BUFFER
,
bufferSize
,
NULL
,
GL_STATIC_DRAW
);
EXPECT_GL_NO_ERROR
();
for
(
int
j
=
0
;
j
<
bufferSize
;
j
++
)
{
for
(
int
k
=
0
;
k
<
bufferSize
-
j
;
k
++
)
{
glBufferSubData
(
GL_ARRAY_BUFFER
,
k
,
j
,
NULL
);
EXPECT_GL_NO_ERROR
();
}
}
}
glDeleteBuffers
(
1
,
&
buf
);
EXPECT_GL_NO_ERROR
();
}
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