Commit 90d98afa by Geoff Lang

Bind a texture after creation so that it has a type.

If a texture is bound to a framebuffer before any data is set on it, the texture does not have a type because it has never been bound. This generates an INVALID_OPERATION because the attachment type cannot be validated. Fixes: * Many generated GL_INVALID_OPERATIONs in chromium BUG=angleproject:884 Change-Id: I4f36f80fecc5a772b6522f8f82e0be9d3758e524 Reviewed-on: https://chromium-review.googlesource.com/273324Tested-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org> Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org>
parent 851cd580
......@@ -69,6 +69,7 @@ TextureGL::TextureGL(GLenum type, const FunctionsGL *functions, StateManagerGL *
ASSERT(mStateManager);
mFunctions->genTextures(1, &mTextureID);
mStateManager->bindTexture(mTextureType, mTextureID);
}
TextureGL::~TextureGL()
......
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