Bug 716439; changes to glContext. r=BenWa

This commit is contained in:
Nicholas Cameron 2012-04-04 17:56:22 +12:00
parent bc5a6227b2
commit f94ad36d3c
2 changed files with 9 additions and 3 deletions

View File

@ -2217,11 +2217,12 @@ GLContext::UploadSurfaceToTexture(gfxASurface *aSurface,
GLuint& aTexture,
bool aOverwrite,
const nsIntPoint& aSrcPoint,
bool aPixelBuffer)
bool aPixelBuffer,
GLenum aTextureUnit)
{
bool textureInited = aOverwrite ? false : true;
MakeCurrent();
fActiveTexture(LOCAL_GL_TEXTURE0);
fActiveTexture(aTextureUnit);
if (!aTexture) {
fGenTextures(1, &aTexture);

View File

@ -1382,6 +1382,10 @@ public:
* \param aPixelBuffer Pass true to upload texture data with an
* offset from the base data (generally for pixel buffer objects),
* otherwise textures are upload with an absolute pointer to the data.
* \param aTextureUnit, the texture unit used temporarily to upload the
* surface. This testure may be overridden, clients should not rely on
* the contents of this texture after this call or even on this
* texture unit being active.
* \return Shader program needed to render this texture.
*/
ShaderProgramType UploadSurfaceToTexture(gfxASurface *aSurface,
@ -1389,7 +1393,8 @@ public:
GLuint& aTexture,
bool aOverwrite = false,
const nsIntPoint& aSrcPoint = nsIntPoint(0, 0),
bool aPixelBuffer = false);
bool aPixelBuffer = false,
GLenum aTextureUnit = LOCAL_GL_TEXTURE0);
void TexImage2D(GLenum target, GLint level, GLint internalformat,