зеркало из https://github.com/mozilla/pjs.git
117 строки
3.1 KiB
Diff
117 строки
3.1 KiB
Diff
Fixes for angle defects 51 and 52
|
|
|
|
Index: src/libGLESv2/Texture.cpp
|
|
===================================================================
|
|
--- src/libGLESv2/Texture.cpp (revision 474)
|
|
+++ src/libGLESv2/Texture.cpp (working copy)
|
|
@@ -1207,6 +1207,9 @@
|
|
mHeight = height << level;
|
|
mImageArray[0].format = internalFormat;
|
|
mType = type;
|
|
+
|
|
+ if (mColorbufferProxy.get())
|
|
+ mColorbufferProxy->setStorage(new TextureColorbufferProxy(this, GL_TEXTURE_2D));
|
|
}
|
|
|
|
return !textureOkay;
|
|
@@ -2081,6 +2084,12 @@
|
|
mImageArray[0][0].height = width << level;
|
|
|
|
mImageArray[0][0].format = internalFormat;
|
|
+
|
|
+ for (int i = 0; i < 6; i++)
|
|
+ {
|
|
+ if (mFaceProxies[i].get())
|
|
+ mFaceProxies[i]->setStorage(new TextureColorbufferProxy(this, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i));
|
|
+ }
|
|
}
|
|
|
|
return !textureOkay;
|
|
Index: src/libGLESv2/Renderbuffer.cpp
|
|
===================================================================
|
|
--- src/libGLESv2/Renderbuffer.cpp (revision 474)
|
|
+++ src/libGLESv2/Renderbuffer.cpp (working copy)
|
|
@@ -246,12 +246,12 @@
|
|
return true;
|
|
}
|
|
|
|
-GLuint Colorbuffer::getRedSize() const
|
|
+GLuint Colorbuffer::getRedSize()
|
|
{
|
|
- if (mRenderTarget)
|
|
+ if (getRenderTarget())
|
|
{
|
|
D3DSURFACE_DESC description;
|
|
- mRenderTarget->GetDesc(&description);
|
|
+ getRenderTarget()->GetDesc(&description);
|
|
|
|
return es2dx::GetRedSize(description.Format);
|
|
}
|
|
@@ -259,12 +259,12 @@
|
|
return 0;
|
|
}
|
|
|
|
-GLuint Colorbuffer::getGreenSize() const
|
|
+GLuint Colorbuffer::getGreenSize()
|
|
{
|
|
- if (mRenderTarget)
|
|
+ if (getRenderTarget())
|
|
{
|
|
D3DSURFACE_DESC description;
|
|
- mRenderTarget->GetDesc(&description);
|
|
+ getRenderTarget()->GetDesc(&description);
|
|
|
|
return es2dx::GetGreenSize(description.Format);
|
|
}
|
|
@@ -272,12 +272,12 @@
|
|
return 0;
|
|
}
|
|
|
|
-GLuint Colorbuffer::getBlueSize() const
|
|
+GLuint Colorbuffer::getBlueSize()
|
|
{
|
|
- if (mRenderTarget)
|
|
+ if (getRenderTarget())
|
|
{
|
|
D3DSURFACE_DESC description;
|
|
- mRenderTarget->GetDesc(&description);
|
|
+ getRenderTarget()->GetDesc(&description);
|
|
|
|
return es2dx::GetBlueSize(description.Format);
|
|
}
|
|
@@ -285,12 +285,12 @@
|
|
return 0;
|
|
}
|
|
|
|
-GLuint Colorbuffer::getAlphaSize() const
|
|
+GLuint Colorbuffer::getAlphaSize()
|
|
{
|
|
- if (mRenderTarget)
|
|
+ if (getRenderTarget())
|
|
{
|
|
D3DSURFACE_DESC description;
|
|
- mRenderTarget->GetDesc(&description);
|
|
+ getRenderTarget()->GetDesc(&description);
|
|
|
|
return es2dx::GetAlphaSize(description.Format);
|
|
}
|
|
Index: src/libGLESv2/Renderbuffer.h
|
|
===================================================================
|
|
--- src/libGLESv2/Renderbuffer.h (revision 474)
|
|
+++ src/libGLESv2/Renderbuffer.h (working copy)
|
|
@@ -109,10 +109,10 @@
|
|
|
|
bool isColorbuffer() const;
|
|
|
|
- GLuint getRedSize() const;
|
|
- GLuint getGreenSize() const;
|
|
- GLuint getBlueSize() const;
|
|
- GLuint getAlphaSize() const;
|
|
+ GLuint getRedSize();
|
|
+ GLuint getGreenSize();
|
|
+ GLuint getBlueSize();
|
|
+ GLuint getAlphaSize();
|
|
|
|
IDirect3DSurface9 *getRenderTarget();
|
|
|