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:
@@ -59,7 +59,7 @@
|
||||
#include "lltoolview.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatar.h"
|
||||
@@ -82,7 +82,7 @@ LLVisualParamHint::LLVisualParamHint(
|
||||
LLViewerVisualParam *param,
|
||||
F32 param_weight)
|
||||
:
|
||||
LLDynamicTexture(width, height, 3, LLDynamicTexture::ORDER_MIDDLE, TRUE ),
|
||||
LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ),
|
||||
mNeedsUpdate( TRUE ),
|
||||
mIsVisible( FALSE ),
|
||||
mJointMesh( mesh ),
|
||||
@@ -109,6 +109,12 @@ LLVisualParamHint::~LLVisualParamHint()
|
||||
LLVisualParamHint::sInstances.erase( this );
|
||||
}
|
||||
|
||||
//virtual
|
||||
S8 LLVisualParamHint::getType() const
|
||||
{
|
||||
return LLViewerDynamicTexture::LL_VISUAL_PARAM_HINT ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// static
|
||||
// requestHintUpdates()
|
||||
@@ -156,7 +162,7 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
|
||||
avatarp->updateGeometry(avatarp->mDrawable);
|
||||
avatarp->updateLOD();
|
||||
|
||||
LLDynamicTexture::preRender(clear_depth);
|
||||
LLViewerDynamicTexture::preRender(clear_depth);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -170,7 +176,7 @@ BOOL LLVisualParamHint::render()
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
|
||||
glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
@@ -178,7 +184,7 @@ BOOL LLVisualParamHint::render()
|
||||
|
||||
LLGLSUIDefault gls_ui;
|
||||
//LLGLState::verify(TRUE);
|
||||
mBackgroundp->draw(0, 0, mWidth, mHeight);
|
||||
mBackgroundp->draw(0, 0, mFullWidth, mFullHeight);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
@@ -225,13 +231,13 @@ BOOL LLVisualParamHint::render()
|
||||
|
||||
gGL.flush();
|
||||
|
||||
LLViewerCamera::getInstance()->setAspect((F32)mWidth / (F32)mHeight);
|
||||
LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / (F32)mFullHeight);
|
||||
LLViewerCamera::getInstance()->setOriginAndLookAt(
|
||||
camera_pos, // camera
|
||||
LLVector3(0.f, 0.f, 1.f), // up
|
||||
target_pos ); // point of interest
|
||||
|
||||
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
|
||||
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
|
||||
|
||||
if (avatarp->mDrawable.notNull())
|
||||
{
|
||||
@@ -245,7 +251,7 @@ BOOL LLVisualParamHint::render()
|
||||
}
|
||||
avatarp->setVisualParamWeight(mVisualParam, mLastParamWeight);
|
||||
gGL.color4f(1,1,1,1);
|
||||
mTexture->setGLTextureCreated(true);
|
||||
mGLTexturep->setGLTextureCreated(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -257,7 +263,7 @@ void LLVisualParamHint::draw()
|
||||
{
|
||||
if (!mIsVisible) return;
|
||||
|
||||
gGL.getTexUnit(0)->bind(getTexture());
|
||||
gGL.getTexUnit(0)->bind(this);
|
||||
|
||||
gGL.color4f(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -265,13 +271,13 @@ void LLVisualParamHint::draw()
|
||||
gGL.begin(LLRender::QUADS);
|
||||
{
|
||||
gGL.texCoord2i(0, 1);
|
||||
gGL.vertex2i(0, mHeight);
|
||||
gGL.vertex2i(0, mFullHeight);
|
||||
gGL.texCoord2i(0, 0);
|
||||
gGL.vertex2i(0, 0);
|
||||
gGL.texCoord2i(1, 0);
|
||||
gGL.vertex2i(mWidth, 0);
|
||||
gGL.vertex2i(mFullWidth, 0);
|
||||
gGL.texCoord2i(1, 1);
|
||||
gGL.vertex2i(mWidth, mHeight);
|
||||
gGL.vertex2i(mFullWidth, mFullHeight);
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
@@ -281,10 +287,16 @@ void LLVisualParamHint::draw()
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLVisualParamReset()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLVisualParamReset::LLVisualParamReset() : LLDynamicTexture(1, 1, 1, ORDER_RESET, FALSE)
|
||||
LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
//virtual
|
||||
S8 LLVisualParamReset::getType() const
|
||||
{
|
||||
return LLViewerDynamicTexture::LL_VISUAL_PARAM_RESET ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// render()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user