Added new acceptable es3 usage tokens for glBufferData.

TRAC #22794 Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2113 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent d4e61972
...@@ -727,17 +727,30 @@ void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, ...@@ -727,17 +727,30 @@ void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data,
return gl::error(GL_INVALID_VALUE); return gl::error(GL_INVALID_VALUE);
} }
gl::Context *context = gl::getNonLostContext();
switch (usage) switch (usage)
{ {
case GL_STREAM_DRAW: case GL_STREAM_DRAW:
case GL_STATIC_DRAW: case GL_STATIC_DRAW:
case GL_DYNAMIC_DRAW: case GL_DYNAMIC_DRAW:
break; break;
default:
case GL_STREAM_READ:
case GL_STREAM_COPY:
case GL_STATIC_READ:
case GL_STATIC_COPY:
case GL_DYNAMIC_READ:
case GL_DYNAMIC_COPY:
if (context && context->getClientVersion() < 3)
{
return gl::error(GL_INVALID_ENUM); return gl::error(GL_INVALID_ENUM);
} }
break;
gl::Context *context = gl::getNonLostContext(); default:
return gl::error(GL_INVALID_ENUM);
}
if (context) if (context)
{ {
......
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