mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 716439; changes to glContext. r=BenWa
This commit is contained in:
parent
bc5a6227b2
commit
f94ad36d3c
@ -2217,11 +2217,12 @@ GLContext::UploadSurfaceToTexture(gfxASurface *aSurface,
|
|||||||
GLuint& aTexture,
|
GLuint& aTexture,
|
||||||
bool aOverwrite,
|
bool aOverwrite,
|
||||||
const nsIntPoint& aSrcPoint,
|
const nsIntPoint& aSrcPoint,
|
||||||
bool aPixelBuffer)
|
bool aPixelBuffer,
|
||||||
|
GLenum aTextureUnit)
|
||||||
{
|
{
|
||||||
bool textureInited = aOverwrite ? false : true;
|
bool textureInited = aOverwrite ? false : true;
|
||||||
MakeCurrent();
|
MakeCurrent();
|
||||||
fActiveTexture(LOCAL_GL_TEXTURE0);
|
fActiveTexture(aTextureUnit);
|
||||||
|
|
||||||
if (!aTexture) {
|
if (!aTexture) {
|
||||||
fGenTextures(1, &aTexture);
|
fGenTextures(1, &aTexture);
|
||||||
|
@ -1382,6 +1382,10 @@ public:
|
|||||||
* \param aPixelBuffer Pass true to upload texture data with an
|
* \param aPixelBuffer Pass true to upload texture data with an
|
||||||
* offset from the base data (generally for pixel buffer objects),
|
* offset from the base data (generally for pixel buffer objects),
|
||||||
* otherwise textures are upload with an absolute pointer to the data.
|
* 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.
|
* \return Shader program needed to render this texture.
|
||||||
*/
|
*/
|
||||||
ShaderProgramType UploadSurfaceToTexture(gfxASurface *aSurface,
|
ShaderProgramType UploadSurfaceToTexture(gfxASurface *aSurface,
|
||||||
@ -1389,7 +1393,8 @@ public:
|
|||||||
GLuint& aTexture,
|
GLuint& aTexture,
|
||||||
bool aOverwrite = false,
|
bool aOverwrite = false,
|
||||||
const nsIntPoint& aSrcPoint = nsIntPoint(0, 0),
|
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,
|
void TexImage2D(GLenum target, GLint level, GLint internalformat,
|
||||||
|
Loading…
Reference in New Issue
Block a user