CheckRenderErrors was undeclared within the TextureGL scope after I'd moved it.