redirect the LinkProgram and ProgramBinary calls through the context.

Trac #21270 Bug=351 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1238 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 834af913
...@@ -1163,6 +1163,20 @@ void Context::useProgram(GLuint program) ...@@ -1163,6 +1163,20 @@ void Context::useProgram(GLuint program)
} }
} }
void Context::linkProgram(GLuint program)
{
Program *programObject = mResourceManager->getProgram(program);
programObject->link();
}
void Context::setProgramBinary(GLuint program, const void *binary, GLint length)
{
Program *programObject = mResourceManager->getProgram(program);
programObject->setProgramBinary(binary, length);
}
void Context::beginQuery(GLenum target, GLuint query) void Context::beginQuery(GLenum target, GLuint query)
{ {
// From EXT_occlusion_query_boolean: If BeginQueryEXT is called with an <id> // From EXT_occlusion_query_boolean: If BeginQueryEXT is called with an <id>
......
...@@ -417,6 +417,8 @@ class Context ...@@ -417,6 +417,8 @@ class Context
void bindDrawFramebuffer(GLuint framebuffer); void bindDrawFramebuffer(GLuint framebuffer);
void bindRenderbuffer(GLuint renderbuffer); void bindRenderbuffer(GLuint renderbuffer);
void useProgram(GLuint program); void useProgram(GLuint program);
void linkProgram(GLuint program);
void setProgramBinary(GLuint program, const void *binary, GLint length);
void beginQuery(GLenum target, GLuint query); void beginQuery(GLenum target, GLuint query);
void endQuery(GLenum target); void endQuery(GLenum target);
......
...@@ -4632,7 +4632,7 @@ void __stdcall glLinkProgram(GLuint program) ...@@ -4632,7 +4632,7 @@ void __stdcall glLinkProgram(GLuint program)
} }
} }
programObject->link(); context->linkProgram(program);
} }
} }
catch(std::bad_alloc&) catch(std::bad_alloc&)
...@@ -6898,7 +6898,7 @@ void __stdcall glProgramBinaryOES(GLuint program, GLenum binaryFormat, ...@@ -6898,7 +6898,7 @@ void __stdcall glProgramBinaryOES(GLuint program, GLenum binaryFormat,
return error(GL_INVALID_OPERATION); return error(GL_INVALID_OPERATION);
} }
programObject->setProgramBinary(binary, length); context->setProgramBinary(program, binary, length);
} }
} }
catch(std::bad_alloc&) catch(std::bad_alloc&)
......
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