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:
Shyotl
2011-03-31 03:22:01 -05:00
parent a028c4edba
commit e756140e1d
212 changed files with 8149 additions and 4445 deletions

View File

@@ -42,13 +42,12 @@
#include "v2math.h"
// newview includes
#include "llviewerimage.h"
#include "llviewercontrol.h"
#include "llsurface.h"
#include "llviewerregion.h"
#include "llagent.h"
#include "llviewercamera.h"
#include "llviewerimagelist.h"
#include "llviewertexturelist.h"
#include "llselectmgr.h"
#include "llfloatertools.h"
#include "llglheaders.h"
@@ -68,12 +67,9 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
{
// Create a texture to hold color information.
// 4 components
// Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges
mTexture = new LLImageGL(FALSE);
// Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges
mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS);
mTexture->createGLTexture(0, mImageRaw, 0, TRUE, LLViewerImageBoostLevel::OTHER);
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->bind(mTexture);
mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), FALSE);
mTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
mTexture->setFilteringOption(LLTexUnit::TFO_POINT);
@@ -283,6 +279,10 @@ void LLViewerParcelOverlay::updateOverlayTexture()
// Copy data into GL texture from raw data
if (i >= COUNT)
{
if (!mTexture->hasGLTexture())
{
mTexture->createGLTexture(0, mImageRaw);
}
mTexture->setSubImage(mImageRaw, 0, 0, mParcelGridsPerEdge, mParcelGridsPerEdge);
mOverlayTextureIdx = -1;
}