Adds resource manager class.
TRAC #12493
The resource manager class is now in charge of allocation &
management of objects which may be shared by multiple contexts.
Signed-off-by: Andrew Lewycky
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Author: Shannon Woods
git-svn-id: https://angleproject.googlecode.com/svn/trunk@360 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 4079d43..305620c 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -32,7 +32,7 @@
if (surface) surface->Release();
}
-Texture::Texture(Context *context) : mContext(context)
+Texture::Texture()
{
mMinFilter = GL_NEAREST_MIPMAP_LINEAR;
mMagFilter = GL_LINEAR;
@@ -51,7 +51,8 @@
Blit *Texture::getBlitter()
{
- return mContext->getBlitter();
+ Context *context = getContext();
+ return context->getBlitter();
}
// Returns true on successful filter state update (valid enum parameter)
@@ -442,7 +443,7 @@
return mBaseTexture ? mBaseTexture->GetLevelCount() : 0;
}
-Texture2D::Texture2D(Context *context) : Texture(context)
+Texture2D::Texture2D()
{
mTexture = NULL;
mColorbufferProxy = NULL;
@@ -898,7 +899,7 @@
return renderTarget;
}
-TextureCubeMap::TextureCubeMap(Context *context) : Texture(context)
+TextureCubeMap::TextureCubeMap()
{
mTexture = NULL;