Add support for eglBindTexImage and eglReleaseTexImage
With this patch we can bind pbuffers as textures. Once we add support for using
a sharing handle to create a pbuffer we can use this to allow us to use it as a
texture as well.
BUG=129
TEST=modified Simple_Texture2D works
Review URL: http://codereview.appspot.com/4291066/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@604 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libEGL/Config.cpp b/src/libEGL/Config.cpp
index 511b8ae..4177962 100644
--- a/src/libEGL/Config.cpp
+++ b/src/libEGL/Config.cpp
@@ -64,6 +64,8 @@
void Config::set(D3DDISPLAYMODE displayMode, EGLint minInterval, EGLint maxInterval, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat, EGLint multiSample, EGLint texWidth, EGLint texHeight)
{
+ mBindToTextureRGB = EGL_FALSE;
+ mBindToTextureRGBA = EGL_FALSE;
switch (renderTargetFormat)
{
case D3DFMT_A1R5G5B5:
@@ -86,6 +88,7 @@
mGreenSize = 8;
mBlueSize = 8;
mAlphaSize = 8;
+ mBindToTextureRGBA = true;
break;
case D3DFMT_R5G6B5:
mBufferSize = 16;
@@ -100,6 +103,7 @@
mGreenSize = 8;
mBlueSize = 8;
mAlphaSize = 0;
+ mBindToTextureRGB = true;
break;
default:
UNREACHABLE(); // Other formats should not be valid
@@ -107,8 +111,6 @@
mLuminanceSize = 0;
mAlphaMaskSize = 0;
- mBindToTextureRGB = EGL_FALSE;
- mBindToTextureRGBA = EGL_FALSE;
mColorBufferType = EGL_RGB_BUFFER;
mConfigCaveat = (displayMode.Format == renderTargetFormat) ? EGL_NONE : EGL_SLOW_CONFIG;
mConfigID = 0;