V2 spatial partition, and all the pipeline changes that go with it.
Note: Deferred mode is not finished, and thus broken. Don't use!
This commit is contained in:
@@ -59,11 +59,13 @@
|
||||
BOOL gDebugGL = FALSE;
|
||||
BOOL gClothRipple = FALSE;
|
||||
BOOL gNoRender = FALSE;
|
||||
BOOL gGLActive = FALSE;
|
||||
LLMatrix4 gGLObliqueProjectionInverse;
|
||||
|
||||
#define LL_GL_NAME_POOLING 0
|
||||
|
||||
LLGLNamePool::pool_list_t LLGLNamePool::sInstances;
|
||||
std::list<LLGLUpdate*> LLGLUpdate::sGLQ;
|
||||
|
||||
#if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS
|
||||
// ATI prototypes
|
||||
|
||||
@@ -361,6 +361,35 @@ protected:
|
||||
virtual void releaseName(GLuint name) = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
Interface for objects that need periodic GL updates applied to them.
|
||||
Used to synchronize GL updates with GL thread.
|
||||
*/
|
||||
class LLGLUpdate
|
||||
{
|
||||
public:
|
||||
|
||||
static std::list<LLGLUpdate*> sGLQ;
|
||||
|
||||
BOOL mInQ;
|
||||
LLGLUpdate()
|
||||
: mInQ(FALSE)
|
||||
{
|
||||
}
|
||||
virtual ~LLGLUpdate()
|
||||
{
|
||||
if (mInQ)
|
||||
{
|
||||
std::list<LLGLUpdate*>::iterator iter = std::find(sGLQ.begin(), sGLQ.end(), this);
|
||||
if (iter != sGLQ.end())
|
||||
{
|
||||
sGLQ.erase(iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual void updateGL() = 0;
|
||||
};
|
||||
|
||||
extern LLMatrix4 gGLObliqueProjectionInverse;
|
||||
|
||||
#include "llglstates.h"
|
||||
@@ -379,4 +408,6 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor
|
||||
|
||||
extern BOOL gClothRipple;
|
||||
extern BOOL gNoRender;
|
||||
extern BOOL gGLActive;
|
||||
|
||||
#endif // LL_LLGL_H
|
||||
|
||||
@@ -352,8 +352,21 @@ void LLImageGL::restoreGL()
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLImageGL::dirtyTexOptions()
|
||||
{
|
||||
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
|
||||
iter != sImageList.end(); iter++)
|
||||
{
|
||||
LLImageGL* glimage = *iter;
|
||||
glimage->mTexOptionsDirty = true;
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//for server side use only.
|
||||
//static
|
||||
BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, BOOL usemipmaps)
|
||||
{
|
||||
@@ -361,12 +374,14 @@ BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, BOOL 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);
|
||||
|
||||
@@ -68,6 +68,7 @@ public:
|
||||
// Save off / restore GL textures
|
||||
static void destroyGL(BOOL save_state = TRUE);
|
||||
static void restoreGL();
|
||||
static void dirtyTexOptions();
|
||||
|
||||
// Sometimes called externally for textures not using LLImageGL (should go away...)
|
||||
static S32 updateBoundTexMemStatic(const S32 delta, const S32 size, S32 category) ;
|
||||
@@ -137,6 +138,7 @@ public:
|
||||
BOOL getBoundRecently() const;
|
||||
BOOL isJustBound() const;
|
||||
LLGLenum getPrimaryFormat() const { return mFormatPrimary; }
|
||||
LLGLenum getFormatType() const { return mFormatType; }
|
||||
|
||||
BOOL getHasGLTexture() const { return mTexName != 0; }
|
||||
LLGLuint getTexName() const { return mTexName; }
|
||||
|
||||
Reference in New Issue
Block a user