diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index c4d91209e6580cfecdc7ae4257db94bb06dbda0b..a86a0aac23f0895ab9d67bc8f9d0c9b5700c5381 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -262,6 +262,31 @@ void LLImageGL::restoreGL() } //---------------------------------------------------------------------------- + +//for server side use only. +//static +BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, BOOL usemipmaps) +{ + dest = new LLImageGL(usemipmaps); + return TRUE; +} + +//for server side use only. +BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, BOOL usemipmaps) +{ + dest = new LLImageGL(width, height, components, usemipmaps); + return TRUE; +} + +//for server side use only. +BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, BOOL usemipmaps) +{ + dest = new LLImageGL(imageraw, usemipmaps); + return TRUE; +} + +//---------------------------------------------------------------------------- + LLImageGL::LLImageGL(BOOL usemipmaps) : mSaveData(0) { diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 84c0f8746e939a54bf01d0fdbc3937a4c3a0dd37..09210b1ef180f24744ba934564a3964aa06de907 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -71,7 +71,14 @@ class LLImageGL : public LLRefCount static S32 updateBoundTexMem(const S32 delta); static bool checkSize(S32 width, S32 height); - + + //for server side use only. + // Not currently necessary for LLImageGL, but required in some derived classes, + // so include for compatability + static BOOL create(LLPointer<LLImageGL>& dest, BOOL usemipmaps = TRUE); + static BOOL create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE); + static BOOL create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, BOOL usemipmaps = TRUE); + public: LLImageGL(BOOL usemipmaps = TRUE); LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE);