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:
@@ -161,7 +161,7 @@
|
||||
#include "llvieweraudio.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewergesture.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerkeyboard.h"
|
||||
#include "llviewermedia.h"
|
||||
@@ -1573,9 +1573,9 @@ LLViewerWindow::LLViewerWindow(
|
||||
|
||||
// Init the image list. Must happen after GL is initialized and before the images that
|
||||
// LLViewerWindow needs are requested.
|
||||
LLImageGL::initClass(LLViewerImageBoostLevel::MAX_GL_IMAGE_CATEGORY) ;
|
||||
gImageList.init();
|
||||
LLViewerImage::initClass();
|
||||
LLImageGL::initClass(LLViewerTexture::MAX_GL_IMAGE_CATEGORY) ;
|
||||
gTextureList.init();
|
||||
LLViewerTextureManager::init() ;
|
||||
gBumpImageList.init();
|
||||
|
||||
// Create container for all sub-views
|
||||
@@ -2031,7 +2031,7 @@ void LLViewerWindow::shutdownGL()
|
||||
gSky.cleanup();
|
||||
stop_glerror();
|
||||
|
||||
gImageList.shutdown();
|
||||
gTextureList.shutdown();
|
||||
stop_glerror();
|
||||
|
||||
gBumpImageList.shutdown();
|
||||
@@ -2043,8 +2043,11 @@ void LLViewerWindow::shutdownGL()
|
||||
gPipeline.cleanup();
|
||||
stop_glerror();
|
||||
|
||||
LLViewerImage::cleanupClass();
|
||||
|
||||
LLViewerTextureManager::cleanup() ;
|
||||
LLImageGL::cleanupClass() ;
|
||||
|
||||
llinfos << "All textures and llimagegl images are destroyed!" << llendl ;
|
||||
|
||||
llinfos << "Cleaning up select manager" << llendl;
|
||||
LLSelectMgr::getInstance()->cleanup();
|
||||
|
||||
@@ -4711,7 +4714,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
|
||||
//Note: --bao
|
||||
//if not necessary, do not change the order of the function calls in this function.
|
||||
//if change something, make sure it will not break anything.
|
||||
//especially be careful to put anything behind gImageList.destroyGL(save_state);
|
||||
//especially be careful to put anything behind gTextureList.destroyGL(save_state);
|
||||
if (!gGLManager.mIsDisabled)
|
||||
{
|
||||
llinfos << "Shutting down GL..." << llendl;
|
||||
@@ -4736,7 +4739,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
|
||||
LLVOAvatar::destroyGL();
|
||||
stop_glerror();
|
||||
|
||||
LLDynamicTexture::destroyGL();
|
||||
LLViewerDynamicTexture::destroyGL();
|
||||
stop_glerror();
|
||||
|
||||
if (gPipeline.isInit())
|
||||
@@ -4754,7 +4757,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
|
||||
gPostProcess->invalidate();
|
||||
}
|
||||
|
||||
gImageList.destroyGL(save_state);
|
||||
gTextureList.destroyGL(save_state);
|
||||
stop_glerror();
|
||||
|
||||
gGLManager.mIsDisabled = TRUE;
|
||||
@@ -4769,7 +4772,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
|
||||
//Note: --bao
|
||||
//if not necessary, do not change the order of the function calls in this function.
|
||||
//if change something, make sure it will not break anything.
|
||||
//especially, be careful to put something before gImageList.restoreGL();
|
||||
//especially, be careful to put something before gTextureList.restoreGL();
|
||||
if (gGLManager.mIsDisabled)
|
||||
{
|
||||
llinfos << "Restoring GL..." << llendl;
|
||||
@@ -4777,7 +4780,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
|
||||
|
||||
initGLDefaults();
|
||||
LLGLState::restoreGL();
|
||||
gImageList.restoreGL();
|
||||
gTextureList.restoreGL();
|
||||
|
||||
// for future support of non-square pixels, and fonts that are properly stretched
|
||||
//LLFontGL::destroyDefaultFonts();
|
||||
@@ -4789,7 +4792,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
|
||||
LLManipTranslate::restoreGL();
|
||||
|
||||
gBumpImageList.restoreGL();
|
||||
LLDynamicTexture::restoreGL();
|
||||
LLViewerDynamicTexture::restoreGL();
|
||||
LLVOAvatar::restoreGL();
|
||||
|
||||
gResizeScreenTexture = TRUE;
|
||||
@@ -5461,7 +5464,7 @@ void LLPickInfo::updateXYCoords()
|
||||
if (mObjectFace > -1)
|
||||
{
|
||||
const LLTextureEntry* tep = getObject()->getTE(mObjectFace);
|
||||
LLPointer<LLViewerImage> imagep = gImageList.getImage(tep->getID());
|
||||
LLPointer<LLViewerTexture> imagep = LLViewerTextureManager::getFetchedTexture(tep->getID());
|
||||
if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull())
|
||||
{
|
||||
mXYCoords.mX = llround(mUVCoords.mV[VX] * (F32)imagep->getWidth());
|
||||
|
||||
Reference in New Issue
Block a user