Innitial commit of experimental v2 texture system port work. Compiles and runs on windows, at least. Fixing bugs as they come.
Need to test: localassetbrowser preview related floaters hgfloatertexteditor maps media textures! Currently very hacky web browser alpha masks on avatars bumpmaps Are all sky components appearing? LLViewerDynamicTexture (texture baking, browser, animated textures, anim previews, etc) Snapshot related features Customize avatar vfs floater UI textures in general Texture priority issues
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "llrender.h"
|
||||
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llpatchvertexarray.h"
|
||||
#include "patch_dct.h"
|
||||
#include "patch_code.h"
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "llappviewer.h"
|
||||
#include "llworld.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerimage.h"
|
||||
#include "llsurfacepatch.h"
|
||||
#include "llvosurfacepatch.h"
|
||||
#include "llvowater.h"
|
||||
@@ -138,12 +137,10 @@ LLSurface::~LLSurface()
|
||||
// Don't enable this until we blitz the draw pool for it as well. -- djs
|
||||
if (mSTexturep)
|
||||
{
|
||||
gImageList.deleteImage(mSTexturep);
|
||||
mSTexturep = NULL;
|
||||
}
|
||||
if (mWaterTexturep)
|
||||
{
|
||||
gImageList.deleteImage(mWaterTexturep);
|
||||
mWaterTexturep = NULL;
|
||||
}
|
||||
}
|
||||
@@ -216,18 +213,18 @@ void LLSurface::create(const S32 grids_per_edge,
|
||||
createPatchData();
|
||||
}
|
||||
|
||||
LLViewerImage* LLSurface::getSTexture()
|
||||
LLViewerTexture* LLSurface::getSTexture()
|
||||
{
|
||||
if (mSTexturep.notNull() && !mSTexturep->getHasGLTexture())
|
||||
if (mSTexturep.notNull() && !mSTexturep->hasGLTexture())
|
||||
{
|
||||
createSTexture();
|
||||
}
|
||||
return mSTexturep;
|
||||
}
|
||||
|
||||
LLViewerImage* LLSurface::getWaterTexture()
|
||||
LLViewerTexture* LLSurface::getWaterTexture()
|
||||
{
|
||||
if (mWaterTexturep.notNull() && !mWaterTexturep->getHasGLTexture())
|
||||
if (mWaterTexturep.notNull() && !mWaterTexturep->hasGLTexture())
|
||||
{
|
||||
createWaterTexture();
|
||||
}
|
||||
@@ -251,11 +248,10 @@ void LLSurface::createSTexture()
|
||||
}
|
||||
}
|
||||
|
||||
mSTexturep = new LLViewerImage(raw, FALSE);
|
||||
mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
|
||||
mSTexturep->dontDiscard();
|
||||
gGL.getTexUnit(0)->bind(mSTexturep.get());
|
||||
mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
gImageList.addImage(mSTexturep);
|
||||
gGL.getTexUnit(0)->bind(mSTexturep);
|
||||
mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,11 +272,11 @@ void LLSurface::createWaterTexture()
|
||||
*(default_texture + (i*sTextureSize/2 + j)*4 + 3) = MAX_WATER_COLOR.mV[3];
|
||||
}
|
||||
}
|
||||
mWaterTexturep = new LLViewerImage(raw, FALSE);
|
||||
|
||||
mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
|
||||
mWaterTexturep->dontDiscard();
|
||||
gGL.getTexUnit(0)->bind(mWaterTexturep.get());
|
||||
gGL.getTexUnit(0)->bind(mWaterTexturep);
|
||||
mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
gImageList.addImage(mWaterTexturep);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1284,7 +1280,7 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
|
||||
}
|
||||
}
|
||||
|
||||
if (!mWaterTexturep->getHasGLTexture())
|
||||
if (!mWaterTexturep->hasGLTexture())
|
||||
{
|
||||
mWaterTexturep->createGLTexture(0, raw);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user