Commit 91f828e3 by Corentin Wallez

LineLoopTest: Fix the test not rendering anything.

BUG=angleproject:1063 Change-Id: Id0772b5c8479150a1e736aa7cd35ec6444753278 Reviewed-on: https://chromium-review.googlesource.com/285126Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 61d46d87
...@@ -51,13 +51,11 @@ class LineLoopTest : public ANGLETest ...@@ -51,13 +51,11 @@ class LineLoopTest : public ANGLETest
} }
mPositionLocation = glGetAttribLocation(mProgram, "position"); mPositionLocation = glGetAttribLocation(mProgram, "position");
mColorLocation = glGetUniformLocation(mProgram, "in_color"); mColorLocation = glGetUniformLocation(mProgram, "color");
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
} }
...@@ -71,6 +69,8 @@ class LineLoopTest : public ANGLETest ...@@ -71,6 +69,8 @@ class LineLoopTest : public ANGLETest
void runTest(GLenum indexType, GLuint indexBuffer, const GLvoid *indexPtr) void runTest(GLenum indexType, GLuint indexBuffer, const GLvoid *indexPtr)
{ {
glClear(GL_COLOR_BUFFER_BIT);
static const GLfloat loopPositions[] = static const GLfloat loopPositions[] =
{ {
0.0f, 0.0f, 0.0f, 0.0f,
...@@ -94,7 +94,7 @@ class LineLoopTest : public ANGLETest ...@@ -94,7 +94,7 @@ class LineLoopTest : public ANGLETest
}; };
static const GLubyte stripIndices[] = static const GLubyte stripIndices[] =
{ {
2, 0, 3, 1, 2 1, 0, 3, 2, 1
}; };
glUseProgram(mProgram); glUseProgram(mProgram);
...@@ -112,6 +112,8 @@ class LineLoopTest : public ANGLETest ...@@ -112,6 +112,8 @@ class LineLoopTest : public ANGLETest
std::vector<GLubyte> pixels(getWindowWidth() * getWindowHeight() * 4); std::vector<GLubyte> pixels(getWindowWidth() * getWindowHeight() * 4);
glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]); glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]);
ASSERT_GL_NO_ERROR();
for (int y = 0; y < getWindowHeight(); y++) for (int y = 0; y < getWindowHeight(); y++)
{ {
for (int x = 0; x < getWindowWidth(); x++) for (int x = 0; x < getWindowWidth(); x++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment