Commit 98c602a7 authored by Vinson Lee's avatar Vinson Lee

draw-elements-base-vertex-neg: Move declaration before code.

Fixes MSVC build.
parent ac5366aa
......@@ -58,11 +58,11 @@ void piglit_init(int argc, char **argv)
static GLuint vboVertexPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *buf, GLsizei bufSize, intptr_t bufOffset)
{
GLuint id;
if (user_va) {
glVertexPointer(size, type, stride, (char*)buf + bufOffset);
return 0;
}
GLuint id;
glGenBuffers(1, &id);
glBindBuffer(GL_ARRAY_BUFFER, id);
glBufferData(GL_ARRAY_BUFFER, bufSize, buf, GL_STATIC_DRAW);
......@@ -72,10 +72,10 @@ static GLuint vboVertexPointer(GLint size, GLenum type, GLsizei stride,
static GLuint vboElementPointer(const GLvoid *buf, GLsizei bufSize)
{
GLuint id;
if (user_va) {
return 0;
}
GLuint id;
glGenBuffers(1, &id);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, id);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, bufSize, buf, GL_STATIC_DRAW);
......
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